.forum_view .header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.forum_view .header-section h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.forum_view .header-section p {
    font-size: 1.43rem;
    opacity: 0.9;
}

.forum_view .category-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.forum_view .category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.forum_view .category-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin-bottom: 16px;
}

.forum_view .icon-blue {
    background: linear-gradient(135deg, #4285f4, #1a73e8);
}

.forum_view .icon-green {
    background: linear-gradient(135deg, #34a853, #137333);
}

.forum_view .icon-purple {
    background: linear-gradient(135deg, #9c27b0, #7b1fa2);
}

.forum_view .icon-orange {
    background: linear-gradient(135deg, #ff9800, #f57c00);
}

.forum_view .icon-indigo {
    background: linear-gradient(135deg, #5c6bc0, #3f51b5);
}

.forum_view .icon-red {
    background: linear-gradient(135deg, #f44336, #d32f2f);
}

.forum_view .category-title {
    font-size: 1.43rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; 
}

.forum_view .category-desc {
    color: #6b7280;
    font-size: 1.43rem;
    margin-bottom: 16px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal; 
}

.forum_view .category-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    color: #9ca3af;
    font-size: 1.43rem;
}

.forum_view .stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.forum_view .latest-post {
    border-top: 1px solid #f3f4f6;
    padding-top: 16px;
    font-size: 1.43rem;
}

.forum_view .latest-post-title {
    color: #374151;
    font-weight: 500;
    margin-bottom: 4px;
    max-width: 50rem;
    /* ประมาณความยาว 50 ตัวอักษร โดยอิงจาก font-size */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum_view .latest-post-meta {
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 8px;
}

.forum_view .badge-new {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    font-size: 1.43rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.forum_view .stats-section {
    background: white;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-top: 48px;
}

.forum_view .stats-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 32px;
    font-family: 'sarabun' !important;
}

.forum_view .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    text-align: center;
}

.forum_view .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.forum_view .stat-label {
    color: #6b7280;
    font-size: 1.43rem;
}

.forum_view .stat-members {
    color: #3b82f6;
}

.forum_view .stat-posts {
    color: #10b981;
}

.forum_view .stat-topics {
    color: #8b5cf6;
}

.forum_view .stat-online {
    color: #f59e0b;
}

.forum_view .navbar-custom {
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 12px 0;
}

.forum_view .navbar-brand {
    font-weight: 600;
    color: #1f2937;
    font-size: 1.43rem;
}

.forum_view .nav-link {
    color: #374151 !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.forum_view .nav-link:hover {
    background-color: #f3f4f6;
    color: #1f2937 !important;
}

.forum_view a {
    text-decoration: none;
}

.forum_view .btn-create {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
    transition: all 0.2s ease;
}

.forum_view .btn-create:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
}

.forum_view .breadcrumb {
    background: none;
    padding: 0;
    margin: 20px 0;
}

.forum_view .breadcrumb-item {
    color: #6b7280;
}

.forum_view .breadcrumb-item+.breadcrumb-item::before {
    content: ">";
    color: #9ca3af;
}

.forum_view .breadcrumb-item.active {
    color: #374151;
    font-weight: 500;
}

.forum_view .forum-header {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.forum_view .forum-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.forum_view .forum-subtitle {
    color: #6b7280;
    margin-bottom: 0;
    font-size: 1.43rem;
}

.forum_view .sort-controls {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 20px;
}

.forum_view .sort-btn {
    background: white;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.43rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forum_view .sort-btn:hover {
    background: #f9fafb;
    color: #374151;
    text-decoration: none;
}

.forum_view .sort-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.forum_view .topic-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
    transition: all 0.2s ease;
}

.forum_view .topic-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.forum_view .topic-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.forum_view .user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.43rem;
    flex-shrink: 0;
}

.forum_view .topic-content {
    flex: 1;
}

.forum_view .topic-title {
    font-size: 1.43rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.4;
    overflow-wrap: break-word;
    word-break: break-word;
    max-height: 3.6em;
    overflow: hidden;
}

.forum_view .topic-title a {
    color: inherit;
    text-decoration: none;
}

.forum_view .topic-title a:hover {
    color: #3b82f6;
}

.forum_view .topic-description,.forum_view .post-content {
    color: #6b7280;
    font-size: 1.43rem;
    margin-bottom: 12px;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-break: break-word;
    max-height: 3.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.forum_view .topic-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.forum_view .tag {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 16px;
    font-size: 1.43rem;
    font-weight: 500;
}

.forum_view .tag.highlighted,
.forum_view .tag.highlighted a {
    background: #fee2e2;
    color: #dc2626;
}

.forum_view .tag.pinned {
    background: #fef3c7;
    color: #d97706;
}

.forum_view .topic-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #9ca3af;
    font-size: 1.43rem;
}

.forum_view .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.forum_view .topic-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #6b7280;
    font-size: 1.43rem;
}

.forum_view .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.forum_view .last-reply {
    color: #9ca3af;
    font-size: 1.43rem;
    margin-top: 8px;
}

/* .forum_view .pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.forum_view .pagination {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 8px;
}

.forum_view .page-link {
    border: none;
    color: #6b7280;
    padding: 8px 12px;
    margin: 0 2px;
    border-radius: 6px;
    font-weight: 500;
}

.forum_view .page-link:hover {
    background: #f3f4f6;
    color: #374151;
}

.forum_view .page-item.active .page-link {
    background: #3b82f6;
    color: white;
} */

.forum_view .hot-topic .topic-title::before {
    content: "🔥";
    margin-right: 8px;
}

.forum_view .pinned-topic .topic-title::before,
.forum_view .pinned-topic .post-title::before {
    /* content: "📌"; */
    content: "";
    background-image: url('../../../images/pin-icon.png');
    margin-right: 8px;
    display: inline-block;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
}

.forum_view .topic-post {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.forum_view .post-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.forum_view .post-info {
    flex: 1;
}

.forum_view .post-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
    line-height: 1.3;
}

.forum_view .post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.forum_view .post-content {
    color: #374151;
    line-height: 1.6;
    margin: 20px 0;
    font-size: 1rem;
}

.forum_view .post-content p {
    margin-bottom: 12px;
}

.forum_view .post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 1.43rem;
    color: #6b7280;
}

.forum_view .meta-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.forum_view .post-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.forum_view .action-btn {
    background: none;
    border: none;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 1.43rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.forum_view .action-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.forum_view .action-btn.liked {
    color: #ef4444;
}

.forum_view .action-btn.unliked {
    color: #f59e0b;
}

.forum_view .replies-section {
    margin-top: 32px;
}

.forum_view .replies-header {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-weight: 600;
}

.forum_view .reply-post {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.forum_view .reply-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.forum_view .reply-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.43rem;
    flex-shrink: 0;
}

.forum_view .reply-avatar.avatar-orange {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.forum_view .reply-avatar.avatar-purple {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.forum_view .reply-info {
    flex: 1;
}

.forum_view .reply-user {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.forum_view .reply-number {
    color: #9ca3af;
    font-size: 1.43rem;
}

.forum_view .reply-content {
    color: #374151;
    line-height: 1.5;
    margin: 12px 0;
}

.forum_view .reply-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 1.43rem;
    color: #9ca3af;
}

.forum_view .reply-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.forum_view .reply-btn {
    background: none;
    border: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 1.43rem;
    transition: all 0.2s ease;
}

.forum_view .reply-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.forum_view .comment-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #f3f4f6;
}

.forum_view .comment-form h3 {
    font-size: 1.43rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 16px;
}

.forum_view .form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1.43rem;
    transition: all 0.2s ease;
}

.forum_view .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.forum_view .comment-textarea {
    min-height: 120px;
    resize: vertical;
}

.forum_view .form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
}

.forum_view .form-note {
    color: #6b7280;
    font-size: 1.43rem;
}

.forum_view .btn-submit {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.forum_view .btn-submit:hover {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    transform: translateY(-1px);
}

.forum_view .btn-cancel {
    background: #f3f4f6;
    border: none;
    color: #6b7280;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.forum_view .btn-cancel:hover {
    background: #e5e7eb;
    color: #374151;
}

.forum_view .btn-reg {
    background: #f59e0b;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.forum_view .btn-reg:hover {
    background: #c48009;
    color: #ffffff;
}

.forum_view .navbar-cate-name {
    max-width: 30rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum_view .sort-btn.btn-danger {
    background: white;
    border: 1px solid #dc3545;
    color: #dc3545;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.43rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forum_view .sort-btn.btn-danger:hover {
    background: #f9fafb;
    border: 1px solid #cd2536;
    color: #cb182a;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.43rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forum_view .sort-btn.btn-warning {
    background: white;
    border: 1px solid #f59e0b;
    color: #f59e0b;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.43rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forum_view .sort-btn.btn-warning:hover {
    background: #f9fafb;
    border: 1px solid #dc8f09;
    color: #c9840d;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 1.43rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.forum_view form#frm_save {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

form {
    display: block;
    position: relative;
    z-index: 1;
}

form button {
    position: relative;
    z-index: 1;
    right: 0;
    top: 0;
    transform: translateY(0%);
}

.txt_confirm_email {
    font-size: 16px;
    font-weight: 100;
    color: red;
}

.forum_view .btn-submit:disabled {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    opacity: 0.5;
    cursor: not-allowed;
}

.box_password {
    position: relative;
}

.btn-see-password {
    position: absolute;
    padding: 12px 16px;
}

.container #frm_save input {
    position: relative !important;
    opacity: 1 !important;
    cursor: auto !important;
}

.navbar-nav a, .navbar-nav button, .text-forums{
    font-size: 1.43rem !important;
}

@media (max-width: 1400px) {
    .forum_view .navbar-cate-name {
        max-width: 20rem;
    }
}

@media (max-width: 1200px) {
    .forum_view .navbar-cate-name {
        max-width: 15rem;
    }
}

@media (max-width: 991.456px) {
    .forum_view .navbar-cate-name {
        max-width: 30rem;
    }
}

@media (max-width: 768px) {
    .forum_view .header-section h1 {
        font-size: 2rem;
    }

    .forum_view .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .forum_view .stat-number {
        font-size: 2rem;
    }

    .forum_view .sort-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .forum_view .topic-header {
        flex-direction: column;
        gap: 12px;
    }

    .forum_view .topic-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    .forum_view .topic-stats {
        justify-content: space-between;
    }

    .forum_view .forum-title {
        font-size: 1.5rem;
    }

    .forum_view .post-header {
        flex-direction: column;
        gap: 12px;
    }

    .forum_view .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .forum_view .post-actions {
        width: 100%;
        justify-content: space-around;
    }

    .forum_view .reply-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .forum_view .form-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .forum_view .navbar-cate-name {
        max-width: 20rem;
    }
}

@media (max-width: 410px) {
    .forum_view .navbar-cate-name {
        max-width: 15rem;
    }
}

@media (max-width: 346px) {
    .forum_view .navbar-cate-name {
        max-width: 10rem;
    }
}

@media (max-width: 300px) {
    .forum_view .navbar-cate-name {
        display: none !important;
    }
}