/* Blog Card Styles */
.blog-card {
    max-width: 400px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-2px);
}

.blog-card-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card-tag {
    display: inline-block;
    background-color: #000;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 8px;
}

.blog-card-date {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: #F75105;
}





/* Blog Admin Styles */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 1920px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .blog-container {
        grid-template-columns: 1fr;
    }

    .preview-section {
        order: 2;
    }

    .editor-section {
        order: 1;
    }
}

@media (max-width: 1024px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
}

/* Editor and Preview Layout */
.preview-section {
    padding: 30px;
    background-color: #f7f7f7;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.editor-section {
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
}

.editor-section form>div {
    margin-bottom: 20px;
}

.editor-section label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

.editor-section input[type="text"],
.editor-section input[type="date"],
.editor-section input[type="number"],
.editor-section textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.editor-section button[type="submit"] {
    background-color: #F24E1E;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.editor-section button[type="submit"]:hover {
    background-color: #e04600;
}

/* Blog Header Styling */
.blog-header {
    margin-bottom: 30px;
}

.blog-date {
    font-family: 'Unbounded', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 5%;
    color: #F24E1E;
    margin-bottom: 16px;
}

.blog-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 100%;
    letter-spacing: 0%;
    color: #000;
    margin: 0 0 16px 0;
}

.blog-tag-pill {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 10%;
    text-align: justify;
    display: inline-block;
    background-color: #000;
    color: #fff;
    padding: 12px 36px;
    border-radius: 50px;
}

.blog-divider {
    border: 0;
    height: 1px;
    background-color: #e0e0e0;
    margin: 30px 0 30px 0;
}

.post-description {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 36px;
    letter-spacing: 0;
    text-align: justify;
    color: #000;
    margin: 24px 0;
}

/* Blog Preview Styles */
#preview {
    width: 840px;
    margin-left: auto;
    margin-right: auto;
    padding: 20px;
    background-color: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

#preview-cover-image {
    width: 100%;
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
}

#preview-cover-image img {
    width: 100%;
    height: 400px;
    display: block;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: 500;
    border-radius: 8px;
}

/* Table of Contents styling */
.toc-container {
    background-color: #f5f5f5;
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0;
    padding-bottom: 8px;
    border: none;
}

.toc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 18px;
    line-height: 28px;
    color: #000;
    margin-bottom: 8px;
}

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

.toc-list li {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 36px;
    letter-spacing: 0%;
    text-align: justify;
    margin: 0;
    padding: 0;
    border-bottom: 2px solid #c9c9c9;
    position: relative;
}

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

.toc-list a {
    font-family: Noto Sans TC;
    font-weight: 400;
    font-style: Regular;
    font-size: 18px;
    leading-trim: NONE;
    line-height: 36px;
    letter-spacing: 0%;
    text-align: justify;
    text-decoration: none;
    display: block;
    padding: 16px 8px 16px 0px;
}

/* Global list styling with orange triangle */
#preview ul li,
.blog-post-container ul li {
    position: relative;
    list-style-type: none;
    padding-right: 25px;
}

#preview ul li::after,
.blog-post-container ul li::after {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 16px;
    height: 16px;
    background-image: url('../images/triangle-orange.svg');
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
}

/* Exclude triangle from table of contents */
#preview .toc-list li::after,
.blog-post-container .toc-list li::after {
    display: none;
}

/* Blog Content Styling */
#preview-content,
.blog-content {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    font-size: 18px;
    line-height: 36px;
    letter-spacing: 0;
    text-align: justify;
    color: #000;
}

#preview-content h2,
.blog-content h2 {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 28px;
    font-weight: 700;
    margin: 36px 0 16px;
    color: #000;
    line-height: 1.4;
    text-align: left;
}

#preview-content h3,
.blog-content h3 {
    font-family: 'Noto Sans TC', sans-serif;
    font-size: 24px;
    font-weight: 700;
    margin: 28px 0 14px;
    line-height: 1.4;
    text-align: left;
}

#preview-content p,
.blog-content p {
    margin-bottom: 20px;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 400;
    text-align: justify;
    line-height: 36px;
}

#preview-content img,
.blog-content img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
}

#preview-content blockquote,
.blog-content blockquote {

    background-color: #000;
    color: #fff;
    padding: 32px;
    border-radius: 16px;
    margin: 40px 0;
    font-family: 'Noto Sans TC', sans-serif;
}

#preview-content ul,
#preview-content ol,
.blog-content ul,
.blog-content ol {
    font-family: 'Noto Sans TC', sans-serif;
    margin-bottom: 20px;
    padding-left: 20px;
}

#preview-content li,
.blog-content li {
    font-family: 'Noto Sans TC', sans-serif;
    margin-bottom: 8px;
    line-height: 36px;
    text-align: justify;
    position: relative;
    list-style-type: none;
    padding-left: 24px;
}


#preview-content a,
.blog-content a {
    font-family: 'Noto Sans TC', sans-serif;
    color: #F24E1E;
    text-decoration: underline;
}

#preview-content table,
.blog-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 24px 0;
    border: 1px solid #ddd;
}

#preview-content table td, 
#preview-content table th,
.blog-content table td,
.blog-content table th {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-family: 'Noto Sans TC', sans-serif;
}

#preview-content table th,
.blog-content table th {
    background-color: #f8f8f8;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
    font-family: 'Noto Sans TC', sans-serif;
}

#preview-content table tr:nth-child(even),
.blog-content table tr:nth-child(even) {
    background-color: #f9f9f9;
}

#preview-content table tr:hover,
.blog-content table tr:hover {
    background-color: #f5f5f5;
}

/* Add styling for highlighted text */
#preview-content [style*="background-color"],
.blog-content [style*="background-color"] {
    color: #F75105 !important;
    background-color: transparent !important;
}

/* Navigation and UI Elements */
.back-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 16px;
}

.back-link:hover {
    color: #F24E1E;
}

/* Flex utilities */
.d-flex {
    display: flex;
}

.justify-between {
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Select2 overrides */
.select2-container {
    width: 100% !important;
    margin-bottom: 20px;
}

.select2-container .select2-selection--multiple {
    min-height: 38px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #F24E1E;
    border: 1px solid #F24E1E;
    color: white;
    border-radius: 30px;
    padding: 2px 10px;
}

/* Blog Post Layout */
.blog-post-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Call to Action Styling */
#conclusion {
    background-color: #000;
    color: #fff;
    padding: 32px;
    border-radius: 16px;
    margin: 40px 0;
}

/* Blog card styling */
.blog-card-title {
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 24px;
    line-height: 36px;
    letter-spacing: 0;
    color: #000000;
    margin-top: 8px;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-card-tag {
    min-width: 120px;
    height: 48px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Noto Sans TC', sans-serif;
    font-weight: 700;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 1px;
}

.blog-card-date {
    font-family: 'Unbounded', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    letter-spacing: 0.05em;
}

/* Recommended Posts Section */
.recommended-posts {
    background-color: #f5f5f5;
    padding: 60px 0;
}

.recommended-posts-title {
    font-family: 'Unbounded', sans-serif;
    font-weight: 700;
    font-size: 40px;
    line-height: 100%;
    letter-spacing: 0;
    color: #F75105;
    margin-bottom: 40px;
}

/* Post Navigation */
.post-navigation {
    border-top: 1px solid #e0e0e0;
    padding-top: 32px;
    margin: 48px 0;
    display: flex;
    justify-content: space-between;
}

.post-navigation a {
    color: #555;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: color 0.3s;
}

.post-navigation a:hover {
    color: #F24E1E;
}

/* Blog Navigation Links */
.blog-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    max-width: 380px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.blog-nav-link:hover {
    background-color: rgba(247, 81, 5, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(247, 81, 5, 0.1);
}

.blog-nav-link:hover .blog-nav-title {
    color: #F24E1E;
}

.blog-nav-link.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.blog-nav-arrow {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.blog-nav-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-nav-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
    font-family: 'Noto Sans TC', sans-serif;
}

.blog-nav-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    font-family: 'Noto Sans TC', sans-serif;
    transition: color 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

.blog-nav-divider {
    width: 1px;
    height: 90px;
    background-color: #e0e0e0;
    margin: 0 20px;
    align-self: center;
}



table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #d0d0d0 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background-color: white !important;
}

tr {
    background-color: white;
}

tr:first-child {
    background-color: #F75105;
}

tr:first-child td {
    background-color: #F75105 !important;
    color: white !important;
    font-weight: bold !important;
}

td {
    border-right: 1px solid #d0d0d0 !important;
    border-bottom: 1px solid #d0d0d0 !important;
    padding: 12px !important;
    background-color: white !important;
}

td:last-child {
    border-right: none !important;
}

tr:last-child td {
    border-bottom: none !important;
}

/* Blog Index Pagination and Layout Styles */
.pagination-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.pagination-link.active {
    background-color: #F75105;
    color: white;
}

.left-divider {
    border-left: none; /* No border by default */
}

@media (min-width: 768px) {
    .left-divider {
        border-left: 2px solid #C9C9C9; /* Border only on md screens and above */
    }
}
