/*
Theme Name: JIN Child Theme
Description: Child Theme for JIN
Template: jin
Version: 1.0.6
*/

/* ===== CSS Reset & Base Overrides ===== */
/* High specificity selectors to override parent theme */
html, body {
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
}

/* Hide original header elements on homepage with high specificity */
body.home #scroll-content,
body.home .hamburger,
body.home .fat-nav,
body.home #header,
body.home .title-page {
    display: none;
}

/* Override parent theme #contents styles with high specificity */
body.home #contents,
body.single #contents,
body.search #contents,
body.archive #contents,
body.page #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

/* Override parent theme #main-contents styles with high specificity */
body.home #main-contents,
body.single #main-contents,
body.search #main-contents,
body.archive #main-contents,
body.page #main-contents {
    width: 100%;
    float: none;
    margin-left: 0;
    margin-bottom: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Search Modal ===== */
#search-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 20px;
    z-index: 9999;
}

#search-modal.is-open {
    display: flex;
}

.search-modal__panel {
    width: min(960px, 92vw);
    background: #fff;
    border-radius: 8px;
    padding: 28px 28px 36px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    position: relative;
}

.search-modal__close {
    position: absolute;
    right: 16px;
    top: 12px;
    border: 0;
    background: transparent;
    color: #333;
    font-weight: 700;
    cursor: pointer;
}

.search-header h1 {
    font-size: 25px;
    font-weight: bold;
}

.search-modal__title {
    margin: 12px 0;
    font-size: 18px;
}

.search-modal__form .form-row {
    margin-bottom: 20px;
}

.search-modal__form .search-input,
.search-modal__form .search-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #ddd;
}

.search-modal__form .tags-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-modal__form .tag-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #eee;
    border-radius: 4px;
}

.search-modal__form .field-label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.search-modal__form .form-actions {
    margin-top: 10px;
}

.search-submit {
    background: #b23f4b;
    color: #fff;
    border: 0;
    padding: 10px 22px;
    border-radius: 6px;
    cursor: pointer;
}

@media (max-width: 767px) {
    .search-modal__panel {
        width: 94vw;
        padding: 20px 16px 24px;
    }
}

/* ===== Custom Header Styles ===== */
body.home .new-header {
    background-color: white;
    width: 100%;
    position: relative;
    display: block;
    margin: 0;
    padding: 0;
}

body.home .header-row-1 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    margin: 0 auto;
    max-width: 1200px;
    padding-left: 20px;
    padding-right: 20px;
}

body.home .header-left {
    flex: 1;
    padding-left: 20px;
}

body.home .searchBtn__link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: 500;
}

body.home .searchBtn__link-text {
    margin-right: 8px;
}

body.home .icon-search {
    width: 25px;
    height: 25px;
    font-family: 'jin-icons';
    font-size: 20px;
    line-height: 25px;
    text-align: center;
    color: #333;
}

body.home .icon-search:before {
    content: "\e931";
}

body.home .header-center {
    flex: 2;
    display: flex;
    justify-content: center;
}

body.home .header-icons {
    display: flex;
    gap: 0px;
    align-items: baseline;
}

body.home .header-icons img:first-child {
    width: 25%;
}

body.home .header-icons img:last-child {
    width: 100%;
}

body.home .icon-item {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home .header-right {
    flex: 1;
}

body.home .header-row-2 {
    background: #000;
    height: 40px;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ===== Main Content Area Styles ===== */
body.home .main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* ===== Part 1: Main Content Layout ===== */
body.home .part-1 {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
}

body.home .main-left {
    flex: 3;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

body.home .main-right {
    flex: 1;
}

/* FV Display Area */
body.home .fv-section {
    margin-bottom: 30px;
}

body.home .fv-image {
    width: 100%;
    height: auto;
    border-radius: unset;
}

/* ===== Article Grid Styles ===== */
body.home .articles-with-images {
    margin-bottom: 30px;
}

body.home .articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

body.home .article-item {
    border-radius: unset;
    overflow: hidden;
    transition: transform 0.3s ease;
}

body.home .article-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.home .article-image {
    position: relative;
    overflow: hidden;
}

body.home .article-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* General publish-date style reset */
body.home .publish-date {
    position: static;
    background: none;
    padding: 0;
    border-radius: 0;
    color: #666;
    font-size: 12px;
}

/* Time label style on images */
body.home .article-image .publish-date {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1;
}

body.home .article-content {
    padding: 15px;
}

body.home .article-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

body.home .article-title a {
    color: #333;
    text-decoration: none;
}

body.home .article-title a:hover {
    color: #007cba;
}

body.home .article-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* ===== Pagination Styles ===== */
body.home .pagination {
    text-align: center;
    margin-top: 20px;
}

body.home .pagination .page-numbers {
    display: flex;
    padding: 8px 12px;
    margin: 0 4px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    align-items: center;
    justify-content: center;
}

body.home .pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* ===== Right Sidebar Styles ===== */
/* Global section-title styles */
.section-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    color: white;
    background-color: black;
    padding: 15px 20px;
    border-radius: 0;
    border-bottom: none;
    text-align: center;
    letter-spacing: 3px;
    font-family: Arial;
}

/* Special style for first NEW ARTICLES title */
.new-articles-section:first-of-type .section-title {
    background: linear-gradient(black 20%, transparent 29%);
    color: black;
    background-color: unset;
    font-family: 游明朝;
    letter-spacing: unset;
    white-space: nowrap;
}

body.home .new-articles-section,
body.home .category-section,
body.home .other-pages-section {
    border-radius: 8px;
    margin-bottom: 20px;
}

body.home .new-articles-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.home .new-article-item {
    padding: 10px 0;
    border-bottom: 1px solid #cccccc;
}

body.home .new-article-item:last-child {
    border-bottom: none;
}

body.home .article-meta {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    gap: 10px;
    align-items: center;
}

body.home .article-category {
    background-color: #DDDDDD;
    border-radius: 2px;
    padding: 3px;
    color: black;
    font-weight: bold;
}

body.home .category-list,
body.home .other-pages-list {
    list-style: square;
    padding: 0 25px;
    margin: 0;
}

body.home .category-item,
body.home .other-page-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

body.home .category-item:last-child,
body.home .other-page-item:last-child {
    border-bottom: none;
}

body.home .category-item a,
body.home .other-page-item a {
    color: #333;
    text-decoration: none;
    display: block;
}

body.home .category-item a:hover,
body.home .other-page-item a:hover {
    color: #007cba;
}

/* ===== MENU Module Styles ===== */
body.home .module-3 {
    border-radius: 8px;
    padding: 20px;
    margin: 0;
}

body.home .module-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #333;
}

body.home .module-3 .module-title {
    font-size: 16px;
    line-height: 1.4;
}

body.home .menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

/* Base menu item styles */
body.home .menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.3s ease;
    margin: 0;
    border: 2px solid #c5dff2;
}

/* Clickable menu items (with URLs) - have hover effects */
body.home .menu-item.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

body.home .menu-item.clickable:hover {
    background: #F4FAFE;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    opacity: 0.7;
}

body.home .menu-item.no-url:hover,
body.home .menu-item.no-url .menu-icon:hover,
body.home .menu-item.no-url .menu-title:hover{
    /* No hover effects for items without URLs */
    transform: none;
    box-shadow: none;
    cursor: default;
}

/* Global header menu item styles */
body.home .header-row-2 .menu-box {
    display: flex;
    justify-content: center;
    gap: 1em;
    align-items: center;
    height: 40px;
}

body.home .header-row-2 .menu-item {
    display: block;
    padding: 0;
    background: none;
    border: none;
    margin: 0;
}

body.home .header-row-2 .menu-item.clickable {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

body.home .header-row-2 .menu-item.clickable:hover {
    background: #141A1E;
    transform: none;
    box-shadow: none;
    opacity: 1;
}

body.home .header-row-2 .menu-item:hover {
    background: #141A1E;
}

body.home .header-row-2 .menu-item a {
	color: #fff;
    text-decoration: none;
}

/* Ensure anchor tags in grid maintain proper layout */
body.home .menu-grid a.menu-item {
    display: flex;
    text-decoration: none;
    color: inherit;
}

body.home .menu-grid a.menu-item:hover {
    text-decoration: none;
    color: inherit;
}

body.home .menu-grid div {
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    font-weight: bold;
    color: #000;
}

/* body.home .menu-grid div:hover {
    background-color: #;
} */
body.home .menu-grid div.menu-item.no-url:last-child{
    background-color: #fff4f4;
    border-left: 6px solid #e98e8e;
    border: none;
    box-shadow: none;
    color: #9e4e4e;
} 

/* Remove opacity change for no-url menu items */
body.home .menu-grid div.clickable :hover * {
    
}

body.home .menu-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home .menu-icon-text {
    width: 100%;
    font-size: 32px;
    display: block;
    text-align: center;
}

body.home .menu-title {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.3;
}

/* ===== Part 2: Image Carousel Styles ===== */
body.home .image-carousel {
    background: #fff;
    border-radius: unset;
    overflow: hidden;
    padding: 30px;
}

body.home .carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    max-width: 1300px;
}

body.home .carousel-item {
    flex: 0 0 100%;
}

body.home .carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* ===== Part 3: Three Column Layout Styles ===== */
.part-3 {
    background-color: #f2f2f2;
    padding: 40px 20px;
    margin: 0;
}

body.home .part-3 {
    margin-bottom: 0;
}

.three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.column-1,
.column-2,
.column-3 {
    border-radius: 8px;
    padding: 20px;
    background-color: unset;
}

.title-box {
    margin-bottom: 20px;
}

.title-box hr {
    margin-top: -2px;
    height: 3px;
    border: none;
    background-color: #e6e0e0;
}

.column-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    text-align: center;
    padding-bottom: 10px;
}

body.home .column-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 0px;
    color: #333;
    text-align: left;
    padding-bottom: 10px;
    position: relative;
    display: inline-block;
    border-bottom: 2px solid #f2f2f2;
}

body.home .column-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    height: 2px;
    background: #9CBFB0;
    width: 100%;
    z-index: 1;
}

/* First Column: Latest Articles with Images */
body.home .latest-articles {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

body.home .latest-article {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 15px;
}

body.home .latest-article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

body.home .article-layout {
    display: flex;
    gap: 15px;
}

body.home .article-layout .article-image {
    flex: 0 0 80px;
}

body.home .article-layout .article-image img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

body.home .article-info {
    flex: 1;
}

body.home .article-info .publish-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
    position: static;
    background: none;
    padding: 0;
    border-radius: 0;
}

body.home .article-info .article-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

body.home .article-info .article-title a {
    color: #333;
    text-decoration: none;
}

body.home .article-info .article-title a:hover {
    color: #007cba;
}

/* Second Column: Mobile Display QR */
body.home .qr-section {
    text-align: center;
}

body.home .qr-image {
    margin-bottom: 15px;
}

body.home .qr-code {
    width: 150px;
    height: 150px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

body.home .qr-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 20px;
}

body.home .search-section {
    margin-top: 20px;
}

body.home .search-form {
    display: flex;
    margin-bottom: 15px;
}

body.home .search-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

body.home .search-button {
    padding: 8px 16px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 14px;
}

body.home .search-button:hover {
    background: #005a8b;
}

body.home .search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

body.home .tag {
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

body.home .tag:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== Footer Styles ===== */
.footer-page {
    background-color: black;
    color: white;
    text-align: center;
    margin: 0;
    margin-top: 0;
}

.footer-page .wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    padding: 30px 0;
}

.footer-page .footer-content {
    font-size: 14px;
    line-height: 1.6;
    color: white;
}

/* ===== Category List Styles ===== */
body.home .category-list-3 {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.home .category-item-3 {
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

/* Category list background colors */
body.home .category-item-3:nth-child(1),
body.home .category-item-3:nth-child(2) {
    background-color: #9CBFB0;
}

body.home .category-item-3:nth-child(1) a,
body.home .category-item-3:nth-child(2) a {
    color: white;
}

body.home .category-item-3:nth-child(3),
body.home .category-item-3:nth-child(4),
body.home .category-item-3:nth-child(5) {
    background-color: white;
}

body.home .category-item-3:nth-child(6),
body.home .category-item-3:nth-child(7),
body.home .category-item-3:nth-child(8) {
    background-color: #9CBFB0;
    color: white;
}

body.home .category-item-3:last-child {
    border-bottom: none;
}

body.home .category-item-3 a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: flex-start;
}

body.home .category-item-3 a:hover {
    color: #007cba;
}

/* Circle indicators for category items */
body.home .category-item-3 a::before {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Green background items: white circle with green center */
body.home .category-item-3:nth-child(1) a::before,
body.home .category-item-3:nth-child(2) a::before,
body.home .category-item-3:nth-child(6) a::before,
body.home .category-item-3:nth-child(7) a::before,
body.home .category-item-3:nth-child(8) a::before {
    margin-right: 5px;
    background: white;
    border: 2px solid white;
    position: relative;
    z-index: 1;
}

body.home .category-item-3:nth-child(1) a::after,
body.home .category-item-3:nth-child(2) a::after,
body.home .category-item-3:nth-child(6) a::after,
body.home .category-item-3:nth-child(7) a::after,
body.home .category-item-3:nth-child(8) a::after {
    content: '●';
    color: #9CBFB0;
    font-size: 3px;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateX(200%) translateY(-50%);
    z-index: 2;
}

/* White background items: hollow circle outline */
body.home .category-item-3:nth-child(3) a::before,
body.home .category-item-3:nth-child(4) a::before,
body.home .category-item-3:nth-child(5) a::before {
    margin-right: 5px;
    background: transparent;
    border: 2px solid #9CBFB0;
}

body.home .category-count {
    color: #666;
    font-size: 10px;
    background: #9CBFB0;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-left: 6px;
    flex-shrink: 0;
}

/* White background items: green circular badges */
body.home .category-item-3:nth-child(3) .category-count,
body.home .category-item-3:nth-child(4) .category-count,
body.home .category-item-3:nth-child(5) .category-count {
    background: #f2f2f2;
    color: #888;
}

/* Green background items: white circular badges */
body.home .category-item-3:nth-child(1) .category-count,
body.home .category-item-3:nth-child(2) .category-count,
body.home .category-item-3:nth-child(6) .category-count,
body.home .category-item-3:nth-child(7) .category-count,
body.home .category-item-3:nth-child(8) .category-count {
    background: #f2f2f2;
    color: #888;
    border: 2px solid #9CBFB0;
}

/* ===== Article Page and Search Results Page Styles ===== */
/* Article page styles */
body.single .cps-post-box {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
}

body.single .cps-post-thumb {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    max-width: 100%;
}

body.single .cps-post-thumb img {
    width: 100%;
    height: auto;
    max-width: 100%;
}

body.single .cps-post-main-box {
    width: 100%;
    max-width: 100%;
}

body.single .cps-post-main {
    width: 100%;
    max-width: 100%;
}

body.single .cps-post-meta.vcard {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    color: #bbb;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.4;
    margin-bottom: 15px;
    justify-content: space-between;
}

body.single .cps-post-meta .writer {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: #bbb;
}

/* body.single .cps-post-meta .cps-post-date-box {
    display: block;
    margin-bottom: 4px;
    color: #bbb;
} */

body.single .cps-post-cat {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    color: white;
    padding: 6px 12px;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
}

body.single .cps-post-cat a {
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0;
    line-height: 1.5rem;
}

/* When no image, category label and article info are in the same row */
body.single .cps-post-thumb:empty+.cps-post-meta .cps-post-cat,
body.single .cps-post-thumb:not(:has(img))+.cps-post-meta .cps-post-cat {
    position: static;
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 10px;
    top: auto;
    right: auto;
    z-index: auto;
}

/* Category label link styles when no image */
body.single .cps-post-thumb:empty+.cps-post-meta .cps-post-cat a,
body.single .cps-post-thumb:not(:has(img))+.cps-post-meta .cps-post-cat a {
    position: static;
    top: auto;
    left: auto;
    line-height: normal;
}

body.single .cps-post-cat:hover,
body.single .cps-post-cat a:hover {
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 0;
}

/* Article info layout adjustment when no image */
body.single .cps-post-thumb:empty+.cps-post-meta,
body.single .cps-post-thumb:not(:has(img))+.cps-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

/* Article title style adjustment when no image */
body.single .cps-post-thumb:empty~.cps-post-meta .cps-post-title,
body.single .cps-post-thumb:not(:has(img))~.cps-post-meta .cps-post-title {
    width: 100%;
    margin-bottom: 10px;
}

/* Article title styling */
body.single .cps-post-title {
    margin-bottom: 20px;
    font-size: 2rem;
    line-height: 1.4;
    color: #333;
}

/* Article meta styling */
/* body.single .cps-post-meta {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
} */

/* Left content area with white background */
body.single .main-left {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Article image container styles - ensure consistent width */
body.single .cps-post-thumb {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

body.single .cps-post-thumb img {
    width: 100%;
    height: auto;
    max-width: 100%;
    display: block;
}

/* Article content area - ensure consistent width */
body.single .cps-post-main-box {
    width: 100%;
    max-width: 100%;
    margin-top: 20px;
}

body.single .cps-post-main {
    width: 100%;
    max-width: 100%;
    line-height: 1.8;
}

/* ===== Breadcrumb Styles ===== */
.page-top-footer i {
    display: none;
}

div#breadcrumb {
    background-color: #f2f2f2;
    border-bottom: 1px solid #cccccc;
    color: #AF917F;
    width: 100%;
    margin-top: 0px;
}

#breadcrumb:after {
    background-color: #f2f2f2;
    opacity: 1;
}

#breadcrumb ul {
    background-color: #f2f2f2;
    margin-top: 0px;
    padding-left: 0;
    margin-left: 0;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

#breadcrumb ul li,
#breadcrumb ul li a {
    color: #AF917F;
    font-size: 0.85rem;
}

#breadcrumb ul li a:hover,
#breadcrumb ul li a.hover {
    color: #AF917F;
    text-decoration: none;
}

#breadcrumb .jin-ifont-arrow:before {
    color: #AF917F;
}

#breadcrumb .jin-ifont-home:before {
    color: #AF917F;
}

/* ===== Unified Article List Styles ===== */
.post-list-mag .post-list-item,
.post-list-mag-sp1col .post-list-item,
.post-list .post-list-item {
    width: 100%;
    margin-bottom: 20px;
    opacity: 1;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.post-list-mag .post-list-item:hover,
.post-list-mag-sp1col .post-list-item:hover,
.post-list .post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.post-list-thumb {
    position: relative;
    overflow: hidden;
}

.post-list-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.post-list-meta {
    padding: 15px;
}

.post-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.post-list-title a {
    color: #333;
    text-decoration: none;
}

.post-list-title a:hover {
    color: #007cba;
}

.post-list-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.post-list-date {
    position: static;
    background: none;
    padding: 0;
    border-radius: 0;
    color: #999;
    font-size: 12px;
    margin-bottom: 5px;
}

.post-list-cat {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 10;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
}

/* ===== Search Tags Styles ===== */
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.search-tags .tag {
    padding: 4px 8px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-tags .tag:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ===== Pagination Styles ===== */
.pager-top {
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
    clear: both;
}

.pager-top .pagination {
    margin: 0 auto;
}

.pager-top .pagination a,
.pager-top .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pager-top .pagination a:hover {
    background-color: #f5f5f5;
    border-color: #999;
}

.pager-top .pagination .current {
    background-color: #007cba;
    color: white;
    border-color: #007cba;
}

/* ===== Responsive Design ===== */
@media screen and (max-width: 1024px) {
    body.home .part-1 {
        flex-direction: column;
        gap: 20px;
    }

    .three-columns {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        padding: 0 20px;
    }

    body.home .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    body.home .main-content {
        padding: 10px;
    }

    body.home .part-1 {
        gap: 15px;
    }

    div#breadcrumb {
        padding: 10px;
    }

    .three-columns {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
        padding: 0 15px;
    }

    body.home .articles-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    body.home .menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    body.home .header-row-1 {
        padding: 15px 0;
    }

    body.home .header-icons {
        gap: 15px;
    }

    body.home .icon-item {
        width: 35px;
        height: 35px;
    }

    body.home .carousel-item img {
        height: 250px;
    }
}

@media screen and (max-width: 480px) {
    body.home .menu-grid {
        grid-template-columns: 1fr;
    }

    body.home .header-left {
        padding-left: 10px;
    }

    body.home .article-layout {
        flex-direction: column;
        gap: 10px;
    }

    body.home .article-layout .article-image {
        flex: none;
    }

    body.home .article-layout .article-image img {
        width: 100%;
        height: 150px;
    }

    div#breadcrumb {
        padding: 10px;
    }
}

/* ===== Responsive Design for All Pages ===== */
@media (max-width: 1200px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        padding: 0 15px;
    }

    body.single .cps-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    body.single .cps-post-cat {
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        padding: 0 10px;
    }
}

@media (max-width: 767px) {
    #breadcrumb ul {
        font-size: 0.75rem;
    }

    #breadcrumb ul li,
    #breadcrumb ul li a {
        font-size: 0.75rem;
    }

    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.page #main-contents {
        width: 100%;
        float: none;
        margin-left: 0;
        padding: 15px;
    }
}

@media (min-width: 768px) {
    #breadcrumb ul {
        font-size: 0.85rem;
    }

    #breadcrumb ul li,
    #breadcrumb ul li a {
        font-size: 0.85rem;
    }
}

/* ===== Search Results Page Styles ===== */
/* Search results page styles */
body.search #main-contents {
    margin: 0 auto;
}
body.search .cps-post-box {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
}

body.search .post-list-item {
    border-radius: unset;
    overflow: hidden;
    transition: transform 0.3s ease;
    background-color: transparent;
    box-shadow: none;
}

body.search .post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.search .post-list-inner {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

body.search .post-list-inner-infeed {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

body.search .post-list-link {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Search page article grid layout - consistent with homepage */
body.search .post-list-mag,
body.search .post-list-mag-sp1col {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    opacity: 1;
    float: none;
    padding: 0;
}

body.search .post-list-mag .post-list-item,
body.search .post-list-mag-sp1col .post-list-item {
    width: 100%;
    margin-bottom: 20px;
    opacity: 1;
}

/* Search page article image styles - consistent with homepage */
.post-list-meta.vcard .post-list-date.date.updated.ef {
    display: flex;
    align-items: center;
}

body.search .post-list-thumb {
    position: relative;
    overflow: hidden;
}

body.search .post-list-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Search page article content styles - consistent with homepage */
body.search .post-list-meta {
    padding: 15px;
}

body.search .post-list-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

body.search .post-list-title a {
    color: #333;
    text-decoration: none;
}

body.search .post-list-title a:hover {
    color: #007cba;
}

body.search .post-list-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Search page article date styles - consistent with homepage */
body.search .post-list-date {
    position: static;
    background: none;
    padding: 0;
    border-radius: 0;
    color: #666;
    font-size: 12px;
    margin-bottom: 5px;
}

/* Search page article category label styles - consistent with homepage */
body.search .post-list-cat {
    display: inline-block;
    margin-bottom: 10px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    color: white;
}

/* Search page time display styles */
body.search .post-list-date,
body.search .post-list-modified-date {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #666;
    position: static;
    background: none;
    padding: 0;
    border-radius: 0;
}

body.search .post-list-date i,
body.search .post-list-modified-date i {
    margin-right: 5px;
    color: #999;
}

/* Search page article content summary styles */
body.search .post-list-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-top: 10px;
    margin-bottom: 10px;
    display: block;
}

/* Search page author info styles */
body.search .writer {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
}

/* Search page no results styles */
body.search .no-posts {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

body.search .no-posts p {
    font-size: 16px;
    margin: 0;
}

/* Search page responsive design - consistent with homepage */
@media (max-width: 767px) {

    body.search .post-list-mag,
    body.search .post-list-mag-sp1col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    body.search .post-list-thumb img {
        height: 150px;
    }

    body.search .post-list-title {
        font-size: 14px;
    }

    body.search .post-list-desc {
        font-size: 12px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {

    body.search .post-list-mag,
    body.search .post-list-mag-sp1col {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Search page main content area responsive design */
@media (max-width: 767px) {
    body.search #main-contents {
        width: 90%;
        max-width: 90%;
        padding: 15px;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    body.search #main-contents {
        width: 80%;
        max-width: 80%;
    }
}

/* ===== Archive Page Styles ===== */
/* Archive page styles */
body.archive .cps-post-box {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
}

/* ===== Page Styles ===== */
/* Page styles */
body.page .cps-post-box {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    color: #000000;
}

/* ===== List Page Unified Styles ===== */
/* Apply unified styles to all list pages (category, tag, archive, search) */
body.archive #main-contents,
body.category #main-contents,
body.tag #main-contents,
body.search #main-contents {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Remove .cps-post-box hentry styles from list pages */
body.archive .cps-post-box.hentry,
body.category .cps-post-box.hentry,
body.tag .cps-post-box.hentry,
body.search .cps-post-box.hentry {
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

/* List pages use two-column layout (except homepage) */
body.archive .main-content,
body.category .main-content,
body.tag .main-content,
body.search .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

body.archive .part-1,
body.category .part-1,
body.tag .part-1,
body.search .part-1 {
    display: flex;
    gap: 40px;
    width: 100%;
}

body.archive .main-left,
body.category .main-left,
body.tag .main-left,
body.search .main-left {
    flex: 3;
    width: auto;
    max-width: 70%;
}

body.archive .main-right,
body.category .main-right,
body.tag .main-right,
body.search .main-right {
    flex: 1;
    width: auto;
}

/* Article pages also use two-column layout */
body.single .main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

body.single .part-1 {
    display: flex;
    gap: 40px;
    width: 100%;
}

body.single .main-left {
    flex: 3;
    width: auto;
    max-width: 70%;
}

body.single .main-right {
    flex: 1;
    width: auto;
}

/* Responsive design */
@media (max-width: 768px) {

    body.archive .main-content,
    body.category .main-content,
    body.tag .main-content,
    body.search .main-content,
    body.single .main-content {
        padding: 10px;
    }

    /* Change to single column layout on mobile devices */
    body.archive .part-1,
    body.category .part-1,
    body.tag .part-1,
    body.search .part-1,
    body.single .part-1 {
        flex-direction: column;
        gap: 20px;
    }

    body.archive .main-left,
    body.category .main-left,
    body.tag .main-left,
    body.search .main-left,
    body.single .main-left {
        width: 100%;
        max-width: 100%;
    }

    body.archive .main-right,
    body.category .main-right,
    body.tag .main-right,
    body.search .main-right,
    body.single .main-right {
        width: 100%;
    }
}

/* ===== Pagination Style Fixes ===== */
/* Ensure homepage styles are applied when paginating */
body.home.paged #contents,
body.paged.home #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home.paged #main-contents,
body.paged.home #main-contents {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Hide original header elements when paginating */
body.home.paged #scroll-content,
body.paged.home #scroll-content,
body.home.paged .hamburger,
body.paged.home .hamburger,
body.home.paged .fat-nav,
body.paged.home .fat-nav,
body.home.paged #header,
body.paged.home #header,
body.home.paged .title-page,
body.paged.home .title-page {
    display: none;
}

/* Responsive layout when paginating */
@media (min-width: 1200px) {

    body.home.paged #contents,
    body.paged.home #contents {
        width: 100%;
    }

    body.home.paged #main-contents,
    body.paged.home #main-contents {
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 835px) and (max-width: 1199px) {

    body.home.paged #contents,
    body.paged.home #contents {
        width: 100%;
    }

    body.home.paged #main-contents,
    body.paged.home #main-contents {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 20px;
    }
}

@media (min-width: 768px) {

    body.home.paged #contents,
    body.paged.home #contents {
        width: 100%;
    }

    body.home.paged #main-contents,
    body.paged.home #main-contents {
        max-width: 100%;
        margin: 0 auto;
        padding: 0 20px;
    }
}

@media (max-width: 767px) {

    body.home.paged #contents,
    body.paged.home #contents {
        width: 100%;
    }

    body.home.paged #main-contents,
    body.paged.home #main-contents {
        max-width: 100%;
        margin: 0 auto;
        padding: 10px;
    }
}

/* Pagination styles when paginating */
body.home.paged .pagination,
body.paged.home .pagination {
    text-align: center;
    margin-top: 20px;
}

body.home.paged .pagination .page-numbers,
body.paged.home .pagination .page-numbers {
    display: flex;
    padding: 8px 12px;
    margin: 0 4px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    align-items: center;
    justify-content: center;
}

body.home.paged .pagination .current,
body.paged.home .pagination .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* Article list styles when paginating */
body.home.paged .post-list-item,
body.paged.home .post-list-item {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.home.paged .post-list-item:hover,
body.paged.home .post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.home.paged .post-list-thumb img,
body.paged.home .post-list-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

body.home.paged .post-list-meta,
body.paged.home .post-list-meta {
    padding: 15px;
}

body.home.paged .post-list-title,
body.paged.home .post-list-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

body.home.paged .post-list-title a,
body.paged.home .post-list-title a {
    color: #333;
    text-decoration: none;
}

body.home.paged .post-list-title a:hover,
body.paged.home .post-list-title a:hover {
    color: #007cba;
}

body.home.paged .post-list-desc,
body.paged.home .post-list-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

body.home.paged .post-list-date,
body.paged.home .post-list-date {
    font-size: 12px;
    color: #999;
}

body.home.paged .post-list-cat,
body.paged.home .post-list-cat {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

body.home.paged .post-list-cat a,
body.paged.home .post-list-cat a {
    color: #666;
    text-decoration: none;
}

body.home.paged .post-list-cat a:hover,
body.paged.home .post-list-cat a:hover {
    color: #007cba;
}

/* ===== 404 Page Styles ===== */
/* General 404 page styles for all pages */
body.error404 #contents,
body #contents.error404 {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.error404 .cps-post-title,
body .cps-post-title.error404 {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

body.error404 .search-section,
body .search-section.error404 {
    margin: 30px 0;
    text-align: center;
}

body.error404 .search-section h3,
body .search-section.error404 h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

body.error404 .search-section form,
body .search-section.error404 form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

body.error404 .search-section .search-input,
body .search-section.error404 .search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

body.error404 .search-section .search-button,
body .search-section.error404 .search-button {
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

body.error404 .search-section .search-button:hover,
body .search-section.error404 .search-button:hover {
    background: #005a8b;
}

body.error404 .recent-posts,
body .recent-posts.error404 {
    margin-top: 30px;
}

body.error404 .recent-posts h3,
body .recent-posts.error404 h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

body.error404 .recent-posts ul,
body .recent-posts.error404 ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.error404 .recent-posts li,
body .recent-posts.error404 li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

body.error404 .recent-posts li:last-child,
body .recent-posts.error404 li:last-child {
    border-bottom: none;
}

body.error404 .recent-posts a,
body .recent-posts.error404 a {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
}

body.error404 .recent-posts a:hover,
body .recent-posts.error404 a:hover {
    text-decoration: underline;
}

/* Homepage specific 404 styles */
body.home #contents.error404,
body.home.error404 #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home #main-contents.error404,
body.home.error404 #main-contents {
    width: 100%;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

body.home .cps-post.error404,
body.home.error404 .cps-post {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-bottom: 20px;
}

body.home .cps-post-title.error404,
body.home.error404 .cps-post-title {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

body.home .search-section.error404,
body.home.error404 .search-section {
    margin: 30px 0;
    text-align: center;
}

body.home .search-section.error404 h3,
body.home.error404 .search-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

body.home .search-section.error404 form,
body.home.error404 .search-section form {
    display: flex;
    justify-content: center;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

body.home .search-section.error404 .search-input,
body.home.error404 .search-section .search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

body.home .search-section.error404 .search-button,
body.home.error404 .search-section .search-button {
    padding: 10px 20px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

body.home .search-section.error404 .search-button:hover,
body.home.error404 .search-section .search-button:hover {
    background: #005a8b;
}

body.home .recent-posts.error404,
body.home.error404 .recent-posts {
    margin-top: 30px;
}

body.home .recent-posts.error404 h3,
body.home.error404 .recent-posts h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

body.home .recent-posts.error404 ul,
body.home.error404 .recent-posts ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.home .recent-posts.error404 li,
body.home.error404 .recent-posts li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

body.home .recent-posts.error404 li:last-child,
body.home.error404 .recent-posts li:last-child {
    border-bottom: none;
}

body.home .recent-posts.error404 a,
body.home.error404 .recent-posts a {
    color: #007cba;
    text-decoration: none;
    font-size: 14px;
}

body.home .recent-posts.error404 a:hover,
body.home.error404 .recent-posts a:hover {
    text-decoration: underline;
}

/* 404 page responsive design */
@media (max-width: 1200px) {

    body.error404 #main-contents,
    body #main-contents.error404,
    body.home #main-contents.error404,
    body.home.error404 #main-contents {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {

    body.error404 #main-contents,
    body #main-contents.error404,
    body.home #main-contents.error404,
    body.home.error404 #main-contents {
        padding: 0 15px;
    }

    body.error404 .search-section form,
    body .search-section.error404 form,
    body.home .search-section.error404 form,
    body.home.error404 .search-section form {
        flex-direction: column;
        gap: 10px;
    }

    body.error404 .cps-post,
    body .cps-post.error404,
    body.home .cps-post.error404,
    body.home.error404 .cps-post {
        padding: 20px;
    }
}

@media (max-width: 480px) {

    body.error404 #main-contents,
    body #main-contents.error404,
    body.home #main-contents.error404,
    body.home.error404 #main-contents {
        padding: 0 10px;
    }
}

/* ===== Other Page Pagination Styles ===== */
/* Category page pagination */
body.home.category.paged #contents,
body.home.paged.category #contents,
body.paged.home.category #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home.category.paged #main-contents,
body.home.paged.category #main-contents,
body.paged.home.category #main-contents {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Archive page pagination */
body.home.archive.paged #contents,
body.home.paged.archive #contents,
body.paged.home.archive #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home.archive.paged #main-contents,
body.home.paged.archive #main-contents,
body.paged.home.archive #main-contents {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Search page pagination */
body.home.search.paged #contents,
body.home.paged.search #contents,
body.paged.home.search #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home.search.paged #main-contents,
body.home.paged.search #main-contents,
body.paged.home.search #main-contents {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Tag page pagination */
body.home.tag.paged #contents,
body.home.paged.tag #contents,
body.paged.home.tag #contents {
    width: 100%;
    margin: 0;
    padding: 0;
    background-color: #f2f2f2;
}

body.home.tag.paged #main-contents,
body.home.paged.tag #main-contents,
body.paged.home.tag #main-contents {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

/* Pagination styles for all paginated pages */
body.home.paged .pager-top,
body.paged.home .pager-top {
    text-align: center;
    margin-top: 20px;
}

body.home.paged .pager-top .page-numbers,
body.paged.home .pager-top .page-numbers {
    display: inline-flex;
    padding: 8px 12px;
    margin: 0 4px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    align-items: center;
    justify-content: center;
}

body.home.paged .pager-top .current,
body.paged.home .pager-top .current {
    background: #007cba;
    color: #fff;
    border-color: #007cba;
}

/* ===== 3 Column Layout Styles ===== */
/* Category page 3 column layout */
body.home .post-list-mag3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

body.home .post-list-mag3col .post-list-item {
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.home .post-list-mag3col .post-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.home .post-list-mag3col .post-list-thumb img {
    height: auto;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

body.home .post-list-mag3col .post-list-meta {
    padding: 15px;
}

body.home .post-list-mag3col .post-list-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

body.home .post-list-mag3col .post-list-title a {
    color: #333;
    text-decoration: none;
}

body.home .post-list-mag3col .post-list-title a:hover {
    color: #007cba;
}

body.home .post-list-mag3col .post-list-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

body.home .post-list-mag3col .post-list-date {
    font-size: 12px;
    color: #999;
}

body.home .post-list-mag3col .post-list-cat {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

body.home .post-list-mag3col .post-list-cat a {
    color: #666;
    text-decoration: none;
}

body.home .post-list-mag3col .post-list-cat a:hover {
    color: #007cba;
}

/* 3 column layout responsive design */
@media (max-width: 1024px) {
    body.home .post-list-mag3col {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

@media (max-width: 768px) {
    body.home .post-list-mag3col {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    body.home .post-list-mag3col .post-list-thumb img {
        height: 180px;
    }

    body.home .post-list-mag3col .post-list-meta {
        padding: 12px;
    }

    body.home .post-list-mag3col .post-list-title {
        font-size: 14px;
    }
}

/* Override parent theme 3 column layout styles */
body.home .post-list-mag3col .post-list-item {
    width: 100%;
    margin-bottom: 0;
    float: none;
}

body.home .post-list-mag3col .post-list-item:nth-child(2n-1) {
    margin-right: 0;
}

@media (max-width: 767px) {
    body.home .post-list-mag3col .post-list-item {
        width: 100%;
        margin-bottom: 0;
    }
}

@media (min-width: 768px) {
    body.home .post-list-mag3col .post-list-item {
        width: 100%;
        margin-bottom: 0;
    }
}

/* ===== Article Page Type Label Position Fix ===== */
/* Move type label to same row as views count and publish time */
body.single .cps-post-header {
    position: relative;
}

body.single .cps-post-cat {
    position: static;
    display: inline-block;
    margin-right: 15px;
    margin-bottom: 0;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    vertical-align: middle;
}

/* Article page meta info row layout */

body.single .cps-post-meta.vcard .cps-post-date-box {
    display: inline-block;
    margin-bottom: 0;
    color: #666;
}

body.single .cps-post-meta .views-count,
body.single .cps-post-meta .comments-count {
    display: inline-block;
    margin-bottom: 0;
    color: #666;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    body.single .cps-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    body.single .cps-post-cat {
        margin-bottom: 8px;
    }
}

/* ===== Layout Alignment Fixes ===== */
/* Ensure consistent alignment between #breadcrumb ul, #main-contents, and .three-columns */

/* Global pagination layout fixes - ensure #main-contents is always centered */
body.paged #main-contents,
body.home.paged #main-contents,
body.paged.home #main-contents,
body.category.paged #main-contents,
body.paged.category #main-contents,
body.archive.paged #main-contents,
body.paged.archive #main-contents,
body.search.paged #main-contents,
body.paged.search #main-contents,
body.tag.paged #main-contents,
body.paged.tag #main-contents {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Responsive adjustments for paginated pages */
@media (max-width: 1200px) {

    body.paged #main-contents,
    body.home.paged #main-contents,
    body.paged.home #main-contents,
    body.category.paged #main-contents,
    body.paged.category #main-contents,
    body.archive.paged #main-contents,
    body.paged.archive #main-contents,
    body.search.paged #main-contents,
    body.paged.search #main-contents,
    body.tag.paged #main-contents,
    body.paged.tag #main-contents {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {

    body.paged #main-contents,
    body.home.paged #main-contents,
    body.paged.home #main-contents,
    body.category.paged #main-contents,
    body.paged.category #main-contents,
    body.archive.paged #main-contents,
    body.paged.archive #main-contents,
    body.search.paged #main-contents,
    body.paged.search #main-contents,
    body.tag.paged #main-contents,
    body.paged.tag #main-contents {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {

    body.paged #main-contents,
    body.home.paged #main-contents,
    body.paged.home #main-contents,
    body.category.paged #main-contents,
    body.paged.category #main-contents,
    body.archive.paged #main-contents,
    body.paged.archive #main-contents,
    body.search.paged #main-contents,
    body.paged.search #main-contents,
    body.tag.paged #main-contents,
    body.paged.tag #main-contents {
        padding: 0 10px;
    }
}

/* Ensure #main-contents has consistent width and alignment */
/* body.home #main-contents,
body.single #main-contents,
body.search #main-contents,
body.archive #main-contents,
body.category #main-contents,
body.tag #main-contents,
body.page #main-contents {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
} */

/* Ensure .three-columns aligns with #main-contents */
.three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Responsive adjustments for consistent alignment */
@media (max-width: 1200px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        max-width: 100%;
        padding: 0 20px;
    }
}

@media (max-width: 768px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {

    #breadcrumb ul,
    body.home #main-contents,
    body.single #main-contents,
    body.search #main-contents,
    body.archive #main-contents,
    body.category #main-contents,
    body.tag #main-contents,
    body.page #main-contents,
    .three-columns {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 0 10px;
    }
}

/* ===== Footer Page Styles ===== */
body.home .footer-page {
    background-color: black;
    color: white;
    text-align: center;
    padding: 40px 20px;
    margin: 0;
    margin-top: 0;
}

body.home .footer-page .footer-content {
    font-size: 14px;
    line-height: 1.6;
    color: white;
}

/* ===== Banner Box Styles ===== */
body.home .banner-box {
    margin-top: 30px;
}

body.home .banner-box a {
    display: block;
    margin-bottom: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.home .banner-box a:last-child {
    margin-bottom: 0;
}

body.home .banner-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

body.home .banner-box img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

/* Banner box responsive design */
@media (max-width: 768px) {
    body.home .banner-box {
        padding: 15px;
        margin-top: 15px;
    }

    body.home .banner-box a {
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    body.home .banner-box {
        padding: 12px;
        margin-top: 12px;
    }

    body.home .banner-box a {
        margin-bottom: 10px;
    }
}