/* Reset và base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar - Sửa lại cho đẹp */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar-brand {
    font-weight: 900;
    font-size: 2rem;
    background: linear-gradient(45deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.navbar-nav .nav-link {
    color: #555 !important;
    font-weight: 600;
    margin: 0 0.5rem;
    padding: 0.8rem 1.5rem !important;
    border-radius: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    transition: left 0.4s ease;
    z-index: -1;
}

.navbar-nav .nav-link:hover::before,
.navbar-nav .nav-link.active::before {
    left: 0;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: white !important;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

/* Main content - sử dụng flex để đẩy footer xuống */
.main-content {
    flex: 1;
    padding-top: 80px;
    padding-bottom: 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: calc(100vh - 80px - 200px); /* 100vh - navbar - footer */
}

/* Content section */
.content-section {
    padding: 2rem 0;
}

/* Featured Post Styles */
.featured-section {
    margin-bottom: 3rem;
    margin-top: 1rem;
}

.featured-post {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    color: #000;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    margin-bottom: 1rem;
    border: 2px solid #ff8f00;
    animation: pulse 2s infinite;
}

.featured-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.featured-excerpt {
    font-size: 1.1rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.featured-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.featured-author,
.featured-date {
    display: flex;
    align-items: center;
    color: #495057;
    font-size: 0.9rem;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.featured-read-more:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.featured-image {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-image img {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.featured-placeholder {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

/* Featured Posts Container - Horizontal Scroll */
.featured-posts-container {
    margin-bottom: 3rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.featured-posts-container::-webkit-scrollbar {
    height: 8px;
}

.featured-posts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.featured-posts-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.featured-posts-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Featured Posts Grid - Horizontal */
.featured-posts {
    display: flex;
    gap: 2rem;
    min-width: max-content;
    padding: 0 1rem;
}

/* Featured Post Item */
.featured-post-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 25px;
    min-width: 400px;
    max-width: 500px;
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.featured-post-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.featured-post-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px rgba(102, 126, 234, 0.4);
}

.featured-post-item h3 {
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.featured-post-item p {
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.featured-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.featured-post-author,
.featured-post-date {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.featured-post-status {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.featured-pinned-badge {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    animation: pulse 2s infinite;
}

.featured-post-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.featured-post-actions .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-post-actions .btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.featured-post-actions .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.featured-post-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.featured-post-actions .btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.featured-post-actions .btn-warning {
    background: linear-gradient(45deg, #ffc107, #f39c12);
    color: #000;
}

.featured-post-actions .btn-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

/* Regular Posts Grid */
.regular-posts-section {
    margin-top: 3rem;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.post-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.post-image {
    width: 100%;
    max-width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
}

.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    color: #6c757d;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: block;
    overflow: visible;
    flex: 1;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.post-author,
.post-date {
    display: flex;
    align-items: center;
    color: #495057;
    font-size: 0.85rem;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    text-decoration: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    margin-top: auto;
    align-self: flex-start;
}

.read-more-btn:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Post Form */
.post-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.post-form h2 {
    color: #2c3e50;
    margin-bottom: 2rem;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.btn-submit {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.post-detail {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.post-detail .post-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-detail .post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.post-detail .post-author,
.post-detail .post-date,
.post-detail .post-views {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 0.9rem;
}

.pinned-badge {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.post-detail .post-excerpt {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 15px;
    border-left: 4px solid #667eea;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    overflow: visible;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-detail .post-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #2c3e50;
}

.post-detail .post-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Admin Panel - CSS đơn giản không conflict */
.admin-panel {
    background: white;
    padding: 2.5rem;
    border-radius: 25px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.admin-panel h3 {
    color: #2c3e50;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-panel h3 i {
    color: #667eea;
    font-size: 1.5rem;
}

.admin-panel h4 {
    color: #495057;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Post Item - Layout đơn giản */
.post-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-color: rgba(102, 126, 234, 0.2);
}

.post-item:last-child {
    margin-bottom: 0;
}

/* Post content area */
.post-content {
    flex: 1;
}

/* Title và description */
.post-item h5 {
    margin: 0 0 0.75rem 0;
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1.4;
}

.post-item p {
    margin: 0 0 1rem 0;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.6;
}

/* Metadata container */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0;
    align-items: center;
}

/* Metadata items */
.card-author,
.card-date {
    display: inline-flex;
    align-items: center;
    color: #495057;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-author:hover,
.card-date:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.post-status {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-pending {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-approved {
    background: linear-gradient(45deg, #d1edff, #b8daff);
    color: #0c5460;
    border: 1px solid #b8daff;
}

.pinned-badge-small {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    border: 1px solid #ff8f00;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    animation: pulse 2s infinite;
}

/* Action buttons container */
.post-actions {
    text-align: right;
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Action buttons */
.btn-action {
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
    margin: 0.25rem;
    display: inline-block;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-action:hover {
    transform: translateY(-3px);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.btn-approve {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-approve:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
}

.btn-reject {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

.btn-reject:hover {
    background: linear-gradient(45deg, #c82333, #c0392b);
}

.btn-edit {
    background: linear-gradient(45deg, #17a2b8, #3498db);
    color: white;
}

.btn-edit:hover {
    background: linear-gradient(45deg, #138496, #2980b9);
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #f39c12);
    color: #000;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #e0a800, #e67e22);
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(45deg, #218838, #1ea085);
}

.btn-danger {
    background: linear-gradient(45deg, #dc3545, #e74c3c);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(45deg, #c82333, #c0392b);
}

/* Footer - Đặt ở cuối trang, làm bé lại */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    margin-top: auto; /* Đẩy footer xuống cuối */
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.1);
}

.footer-content {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.footer-header {
    margin-bottom: 1rem;
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #ecf0f1;
    margin-bottom: 0.5rem;
}

.team-members {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.team-member {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.team-member:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.member-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.member-info strong {
    color: #ecf0f1;
    font-size: 0.9rem;
}

.member-class {
    color: #bdc3c7;
    font-size: 0.75rem;
}

/* No Posts */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-posts i {
    color: #6c757d;
    margin-bottom: 1rem;
}

.no-posts h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.no-posts p {
    color: #6c757d;
    margin-bottom: 2rem;
}

/* View All Button */
.view-all-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white !important;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-all-btn:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .featured-meta {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .featured-post {
        padding: 1.5rem;
    }
    
    .main-content {
        padding-top: 70px;
    }
    
    .team-members {
        flex-direction: column;
        gap: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 1rem !important;
        margin: 0 0.25rem;
    }
}

@media (max-width: 576px) {
    .featured-title {
        font-size: 1.75rem;
    }
    
    .featured-excerpt {
        font-size: 1rem;
    }
    
    .featured-post {
        padding: 1rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-form {
        padding: 1.5rem;
    }
    
    .post-detail {
        padding: 1.5rem;
    }
    
    .admin-panel {
        padding: 1.5rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
}

/* Animation */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Card animations */
.post-card,
.featured-post {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.post-card.visible,
.featured-post.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Featured Posts Container - Horizontal Scroll cho trang chủ */
.featured-posts-container {
    margin-bottom: 3rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Navigation Arrows */
.featured-nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-nav-arrow:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.featured-nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.featured-nav-arrow.prev {
    left: -25px;
}

.featured-nav-arrow.next {
    right: -25px;
}

.featured-nav-arrow i {
    font-size: 1.2rem;
    color: #667eea;
    transition: color 0.3s ease;
}

.featured-nav-arrow:hover i {
    color: white;
}

.featured-nav-arrow.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f9fa;
    border-color: #dee2e6;
}

.featured-nav-arrow.disabled:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    transform: translateY(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.featured-nav-arrow.disabled i {
    color: #adb5bd;
}

/* Dots Navigation */
.featured-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.featured-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dee2e6;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.featured-dot:hover {
    background: #adb5bd;
    transform: scale(1.2);
}

.featured-dot.active {
    background: #667eea;
    transform: scale(1.3);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Scrollbar styling */
.featured-posts-container::-webkit-scrollbar {
    height: 8px;
}

.featured-posts-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
    margin: 0 1rem;
}

.featured-posts-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.featured-posts-container::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Featured Posts Grid - Horizontal cho trang chủ */
.featured-posts {
    display: flex;
    gap: 2rem;
    min-width: max-content;
    padding: 1rem 2rem;
}

/* Featured Post Single - Chỉ 1 bài viết */
.featured-post-single {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border: 1px solid #e9ecef;
}

/* Featured Post Item cho trang chủ */
.featured-post-item {
    background: white;
    color: #333;
    padding: 0;
    border-radius: 0;
    min-width: auto;
    max-width: none;
    box-shadow: none;
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
}

.featured-post-item:hover {
    transform: none;
    box-shadow: none;
    border-color: transparent;
}

/* Featured Post Content */
.featured-post-content {
    flex: 1;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.featured-badge {
    background: linear-gradient(45deg, #ffc107, #ff8f00);
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    border: 1px solid #ffc107;
    box-shadow: 0 3px 10px rgba(255, 193, 7, 0.3);
    animation: pulse 2s infinite;
}

.featured-post-title {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    color: #2c3e50;
}

.featured-post-excerpt {
    margin: 0 0 1.5rem 0;
    color: #6c757d;
    line-height: 1.6;
    font-size: 1rem;
}

.featured-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.featured-post-author,
.featured-post-date {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #495057;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    border: 1px solid #e9ecef;
}

.featured-post-read-more {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    border: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.featured-post-read-more:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4c93);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Featured Post Image */
.featured-post-image {
    flex-shrink: 0;
    text-align: center;
    width: 400px;
}

.featured-post-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.featured-post-item:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-post-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: #f8f9fa;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
}

.featured-post-placeholder i {
    color: #adb5bd;
    font-size: 2.5rem;
}

/* Responsive cho trang chủ */
@media (max-width: 768px) {
    .featured-posts-container {
        margin-bottom: 2rem;
    }
    
    .featured-post-item {
        min-width: 400px;
        padding: 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .featured-post-title {
        font-size: 1.2rem;
    }
    
    .featured-posts {
        gap: 1.5rem;
        padding: 1rem 1.5rem;
    }
    
    .featured-post-image {
        width: 100%;
    }
    
    .featured-post-image img,
    .featured-post-placeholder {
        height: 120px;
    }
}

/* Post Cards - Design đẹp và hiện đại cho trang chủ */
.post-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(102, 126, 234, 0.2);
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover::before {
    opacity: 1;
}

/* Post Image */
.post-image {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.post-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.post-card:hover .post-image::after {
    opacity: 1;
}

/* Post Content */
.post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.post-card:hover .post-title {
    color: #667eea;
}

.post-excerpt {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: block;
    overflow: visible;
    flex: 1;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Post Meta */
.post-meta {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f3f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-author,
.post-date {
    color: #6c757d;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-author i,
.post-date i {
    color: #667eea;
    font-size: 0.8rem;
}

/* Read More Button */
.read-more-btn {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    align-self: flex-start;
}

.read-more-btn:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4c93);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.read-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 992px) {
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .post-card {
        margin: 0 1rem;
    }
}

/* Featured Post (Pinned) */
.featured-post-item {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    border: none;
    overflow: visible;
    transition: all 0.4s ease;
    display: flex;
    align-items: stretch;
    margin-bottom: 2rem;
}

.featured-post-item:hover {
    transform: none;
    box-shadow: none;
}

.featured-post-content {
    flex: 1;
    padding: 0 2rem 0 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.featured-badge {
    display: inline-block;
    background: linear-gradient(45deg, #ffc107, #ff8c00);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

.featured-post-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-post-excerpt {
    color: #6c757d;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.featured-post-meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.featured-post-author,
.featured-post-date {
    color: #6c757d;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-post-author i,
.featured-post-date i {
    color: #667eea;
}

.featured-post-read-more {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    align-self: flex-start;
}

.featured-post-read-more:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4c93);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    text-decoration: none;
}

.featured-post-image {
    flex-shrink: 0;
    text-align: center;
    width: 400px;
    position: relative;
    overflow: hidden;
}

.featured-post-image img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
    border-radius: 15px;
}

.featured-post-item:hover .featured-post-image img {
    transform: scale(1.05);
}

.featured-post-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #dee2e6;
    color: #adb5bd;
}

/* Responsive cho Featured Post */
@media (max-width: 768px) {
    .featured-post-item {
        flex-direction: column;
    }
    
    .featured-post-content {
        padding: 2rem;
    }
    
    .featured-post-image {
        width: 100%;
    }
    
    .featured-post-title {
        font-size: 1.5rem;
    }
    
    .featured-post-meta {
        gap: 1rem;
    }
}

/* Social Actions Styles */
.social-actions {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-item {
    text-align: center;
}

.btn-like, .btn-comment, .btn-share {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-like:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

.btn-comment:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(23, 162, 184, 0.3);
}

.btn-share:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.btn-like.btn-primary {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border-color: #dc3545;
    color: white;
}

.btn-comment.btn-info {
    background: linear-gradient(45deg, #17a2b8, #138496);
    border-color: #17a2b8;
    color: white;
}

.btn-share.btn-success {
    background: linear-gradient(45deg, #28a745, #1e7e34);
    border-color: #28a745;
    color: white;
}

/* Comment Section Styles */
.comment-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.comment-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
}

/* COMMENT FORM - CSS MỚI HOÀN TOÀN */
.comment-form-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.comment-form-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    flex-basis: 60px;
    min-width: 60px;
    max-width: 60px;
}

.comment-form-avatar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.comment-form-avatar:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.comment-form-title {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.comment-form-title h5 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.comment-form-title p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* COMMENT FORM LAYOUT FIX */
.comment-form {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.comment-form .row {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.comment-form .col-md-4,
.comment-form .col-md-8 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    float: none !important;
}

.comment-form .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* CSS MỚI HOÀN TOÀN - TRÁNH CONFLICT */
.comment-form-new {
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.comment-form-new .comment-form-header {
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 1.5rem !important;
    padding: 1rem !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-radius: 15px !important;
    backdrop-filter: blur(10px) !important;
    gap: 1rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.comment-form-new .comment-form-avatar {
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-size: 1.5rem !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3) !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    flex-basis: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
}

.comment-form-new .comment-form-title {
    flex: 1 !important;
    min-width: 0 !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

.comment-form-new .comment-form-title h5 {
    margin: 0 !important;
    color: #333 !important;
    font-weight: 600 !important;
}

.comment-form-new .comment-form-title p {
    margin: 0 !important;
    color: #666 !important;
    font-size: 0.9rem !important;
}

.comment-form-new .row {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 1rem !important;
}

.comment-form-new .col-md-4,
.comment-form-new .col-md-8 {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: none !important;
    float: none !important;
}

.comment-form-new .form-control {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.comment-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.comment-form .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    transition: all 0.3s ease;
}

.comment-form .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

/* Comments List Styles */
.comments-list {
    margin-top: 2rem;
}

.comment-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.comment-item:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.comment-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.comment-avatar.user-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.comment-avatar.admin {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
}

.comment-avatar.moderator {
    background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}

.comment-author-info {
    flex: 1;
}

.comment-author {
    color: #667eea;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.comment-date {
    font-size: 0.875rem;
    color: #6c757d;
    display: block;
}

.comment-content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-like-comment,
.btn-dislike-comment {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: #f8f9fa;
    color: #6c757d;
}

.btn-like-comment:hover {
    background: #e3f2fd;
    color: #1976d2;
    border-color: #1976d2;
    transform: translateY(-2px);
}

.btn-dislike-comment:hover {
    background: #ffebee;
    color: #d32f2f;
    border-color: #d32f2f;
    transform: translateY(-2px);
}

.comment-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comments-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.comments-empty h5 {
    margin-bottom: 0.5rem;
    color: #495057;
}

.comments-empty p {
    margin: 0;
    font-size: 0.9rem;
}

/* Comment Section Styling */
.comment-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 2rem;
}

.comment-section h4 {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.comment-form {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.comment-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.comment-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.comment-form .btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Comment Item Styling */
.comment-item {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.comment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
}

.comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 1rem;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.comment-avatar.user-default {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.comment-avatar.admin {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.comment-avatar.moderator {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.comment-author-info {
    flex: 1;
}

.comment-author {
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    font-size: 1.1rem;
}

.comment-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.comment-content {
    color: #495057;
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.comment-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.btn-like-comment, .btn-dislike-comment {
    transition: all 0.3s ease;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 2px solid transparent;
    font-weight: 500;
    min-width: 80px;
}

.btn-like-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-dislike-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

.btn-like-comment.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-color: #007bff;
    color: white;
}

.btn-dislike-comment.btn-danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
    border-color: #dc3545;
    color: white;
}

.btn-like-comment.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

.btn-dislike-comment.btn-outline-danger {
    border-color: #dc3545;
    color: #dc3545;
}

/* Comment Stats */
.comment-stats {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    color: #6c757d;
    font-size: 0.9rem;
}

.comment-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Empty Comments State */
.comments-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #6c757d;
}

.comments-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

    /* Comment Form Enhancement */
    .comment-form-header {
        display: flex;
        align-items: center;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .comment-form-avatar {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-weight: bold;
        font-size: 1.2rem;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        transition: all 0.3s ease;
        position: relative;
        overflow: hidden;
    }
    
    .comment-form-avatar::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
        pointer-events: none;
    }
    
    .comment-form-avatar:hover {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    }

.comment-form-title {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .comment-section {
        padding: 1rem;
    }
    
    .comment-item {
        padding: 1rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .comment-actions {
        flex-wrap: wrap;
    }
    
    .comment-stats {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

/* Post Stats Styles */
.post-stats {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.post-stat {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    color: #6c757d;
    font-weight: 500;
}

.post-stat i {
    margin-right: 0.25rem;
}

/* Notification Styles */
.alert {
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .social-actions .row {
        gap: 1rem;
    }
    
    .action-item {
        margin-bottom: 1rem;
    }
    
    .post-stats {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .comment-form .row {
        gap: 1rem;
    }
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Survey card styles */
.survey-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.survey-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.survey-header {
    background: white;
    color: #333;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #e9ecef;
}

.survey-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.survey-icon i {
    font-size: 1.2rem;
    color: white;
}

.survey-info {
    flex: 1;
}

.survey-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #333;
}

.survey-description {
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    color: #6c757d;
    line-height: 1.4;
}

.survey-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.survey-date,
.survey-author {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.survey-content {
    padding: 1.5rem;
    background: white;
}

.survey-iframe {
    width: 100%;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    background: white;
}

@media (max-width: 768px) {
    .survey-card {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .survey-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.8rem;
    }
    
    .survey-icon {
        width: 45px;
        height: 45px;
    }
    
    .survey-icon i {
        font-size: 1rem;
    }
    
    .survey-title {
        font-size: 1.1rem;
    }
    
    .survey-description {
        font-size: 0.85rem;
    }
    
    .survey-meta {
        justify-content: center;
        gap: 0.8rem;
        font-size: 0.75rem;
    }
    
    .survey-content {
        padding: 1rem;
    }
    
    .survey-iframe {
        height: 400px;
        border-radius: 8px;
    }
}

/* Related Posts Section Styles */
.related-posts-section {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.related-posts-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-posts-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.related-posts-subtitle {
    font-size: 1rem;
    color: #6c757d;
    font-weight: 400;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-post-item {
    background: #f8f9fa;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    cursor: pointer;
}

.related-post-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.related-post-image {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-item:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: #6c757d;
}

.related-post-content {
    padding: 1.2rem;
}

.related-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.related-post-title a {
    color: #2c3e50;
    transition: color 0.3s ease;
}

.related-post-title a:hover {
    color: #667eea;
}

.related-post-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: block;
    overflow: visible;
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.related-post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.related-post-author,
.related-post-date {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.related-post-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.related-post-stat {
    font-size: 0.8rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.related-posts-empty {
    text-align: center;
    padding: 2rem 1rem;
    grid-column: 1 / -1;
}

.empty-icon {
    margin-bottom: 1rem;
    color: #6c757d;
}

.empty-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Responsive Design for Related Posts */
@media (max-width: 768px) {
    .related-posts-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .related-posts-title {
        font-size: 1.6rem;
    }
    
    .related-posts-subtitle {
        font-size: 0.9rem;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .related-post-content {
        padding: 1rem;
    }
    
    .related-post-title {
        font-size: 1rem;
    }
    
    .related-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .related-post-stats {
        justify-content: space-between;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .related-posts-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    
    .related-posts-title {
        font-size: 1.4rem;
    }
    
    .related-post-content {
        padding: 0.8rem;
    }
}

/* Mobile-First Responsive Design */
/* ============================= */

/* Base Mobile Styles */
@media (max-width: 767px) {
    /* General Layout */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .main-content {
        padding-top: 70px;
        padding-bottom: 1rem;
    }
    
    /* Typography */
    h1, .h1 { font-size: 1.75rem !important; }
    h2, .h2 { font-size: 1.5rem !important; }
    h3, .h3 { font-size: 1.25rem !important; }
    h4, .h4 { font-size: 1.1rem !important; }
    h5, .h5 { font-size: 1rem !important; }
    
    /* Navbar Mobile */
    .navbar {
        padding: 0.5rem 0;
    }
    
    .navbar-brand {
        font-size: 1.3rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
        border-radius: 15px;
        text-align: center;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    /* Featured Posts Mobile */
    .featured-section {
        margin-bottom: 2rem;
        margin-top: 0.5rem;
    }
    
    .featured-post {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .featured-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }
    
    .featured-excerpt {
        font-size: 1rem !important;
    }
    
    .featured-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .featured-posts-container {
        margin-bottom: 2rem;
        border-radius: 10px;
    }
    
    .featured-posts {
        gap: 1rem;
        padding: 0.75rem 1rem;
    }
    
    .featured-post-item {
        min-width: 280px;
        padding: 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .featured-post-title {
        font-size: 1.2rem !important;
    }
    
    .featured-post-image {
        width: 100%;
    }
    
    .featured-post-image img,
    .featured-post-placeholder {
        height: 150px;
        border-radius: 10px;
    }
    
    /* Posts Grid Mobile */
    .posts-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    
    .post-card {
        margin: 0 0.5rem;
        border-radius: 15px;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-title {
        font-size: 1.1rem !important;
    }
    
    .post-excerpt {
        font-size: 0.9rem !important;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    /* Post Detail Mobile */
    .post-detail {
        padding: 1.5rem;
        margin-top: 1.5rem;
        border-radius: 15px;
    }
    
    .post-detail .post-title {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }
    
    .post-detail .post-meta {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
        padding-left: 1rem;
    }
    
    .post-detail .post-meta > * {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
        border-left: 2px solid #e9ecef;
        background: rgba(102, 126, 234, 0.03);
        border-radius: 8px;
        margin-bottom: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        transition: all 0.2s ease;
    }
    
    .post-detail .post-meta i {
        color: #667eea;
        font-size: 0.9rem;
        min-width: 18px;
        text-align: center;
        opacity: 0.8;
    }
    
    /* Mobile pinned badge styling */
    .pinned-badge {
        width: auto !important;
        max-width: fit-content !important;
        text-align: center !important;
        padding: 0.5rem 1rem !important;
        border-radius: 20px !important;
        font-size: 0.85rem !important;
        font-weight: 500 !important;
        margin: 1rem auto 0 auto !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.5rem !important;
        box-sizing: border-box !important;
        background: linear-gradient(135deg, #ff6b35, #f7931e) !important;
        color: white !important;
        box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3) !important;
    }
    
    .pinned-badge i {
        font-size: 0.9rem !important;
        color: white !important;
    }
    
    .post-detail .post-excerpt {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .post-detail .post-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Text Bubbles and Content Boxes Mobile Fix */
    .post-excerpt,
    .post-content,
    .comment-content,
    .related-post-excerpt,
    .featured-excerpt,
    .featured-post-excerpt {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.6;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for long text content */
    .post-content p,
    .comment-content p,
    .post-excerpt p {
        margin-bottom: 1rem;
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix for text with long words */
    .post-content *,
    .comment-content *,
    .post-excerpt * {
        max-width: 100%;
        overflow-wrap: break-word;
    }
    
    /* Social Actions Mobile */
    .social-actions {
        padding: 1.5rem;
        border-radius: 12px;
        margin-top: 1.5rem;
    }
    
    .social-actions .row {
        gap: 1rem;
    }
    
    .action-item {
        margin-bottom: 0;
    }
    
    .btn-like, .btn-comment, .btn-share {
        width: 100%;
        padding: 0.875rem;
        font-size: 0.9rem;
        border-radius: 10px;
    }
    
    /* Comment Section Mobile */
    .comment-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
        border-radius: 12px;
    }
    
    /* Fix for text bubbles and content overflow */
    .alert,
    .post-excerpt,
    .comment-content,
    .post-content,
    .featured-excerpt,
    .related-post-excerpt {
        width: 100% !important;
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        hyphens: auto;
        box-sizing: border-box !important;
        /* Fix height and width auto-expand */
        height: auto !important;
        min-height: fit-content !important;
        overflow: visible !important;
        white-space: normal !important;
        /* Fix horizontal overflow */
        min-width: 0 !important;
        flex-shrink: 1 !important;
        flex-grow: 1 !important;
    }
    
    /* Specific fix for post structure */
    .post-detail.post-form {
        width: 100% !important;
        max-width: 100% !important;
        overflow: visible !important;
        word-wrap: break-word !important;
    }
    
    .post-detail.post-form .post-excerpt,
    .post-detail.post-form .post-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        hyphens: auto;
    }
    
    /* Fix for lead paragraph */
    .post-excerpt .lead,
    .post-excerpt p.lead {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
        hyphens: auto;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Fix for long Vietnamese text */
    .post-content *,
    .comment-content *,
    .post-excerpt *,
    .featured-excerpt *,
    .related-post-excerpt * {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
    }
    
    /* Fix for text containers */
    .post-detail,
    .comment-item,
    .post-card,
    .featured-post,
    .related-post-item {
        overflow: visible !important;
        word-wrap: break-word;
        height: auto !important;
        min-height: fit-content !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-shrink: 1 !important;
        flex-grow: 1 !important;
    }
    
    /* Override Bootstrap container constraints */
    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box !important;
    }
    
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    .col-md-4,
    .col-md-8,
    .col-md-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    /* Fix for specific text containers that need height auto */
    .post-excerpt,
    .post-content,
    .comment-content,
    .featured-excerpt,
    .related-post-excerpt,
    .alert,
    .lead,
    p {
        height: auto !important;
        min-height: fit-content !important;
        overflow: visible !important;
        white-space: normal !important;
        line-height: 1.6 !important;
        padding-bottom: 0.5rem !important;
        /* Fix horizontal expansion */
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto;
    }
    
    /* Force text to wrap and container to expand */
    .post-excerpt *,
    .post-content *,
    .comment-content *,
    .featured-excerpt *,
    .related-post-excerpt *,
    .alert *,
    .lead *,
    p * {
        max-width: 100% !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
        white-space: normal !important;
    }
    
    /* Critical fix for post structure on mobile */
    .post-detail.post-form {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .post-detail.post-form > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-wrap: break-word !important;
        word-wrap: break-word !important;
        word-break: break-word !important;
    }
    
    /* Fix for Bootstrap grid system on mobile */
    @media (max-width: 767px) {
        .container-fluid {
            padding-left: 0 !important;
            padding-right: 0 !important;
        }
        
        .post-detail.post-form {
            margin-left: 0 !important;
            margin-right: 0 !important;
            padding-left: 15px !important;
            padding-right: 15px !important;
        }
        
        /* Override Bootstrap grid completely */
        .row {
            margin-left: 0 !important;
            margin-right: 0 !important;
            width: 100% !important;
        }
        
        .col-md-4,
        .col-md-8,
        .col-md-12 {
            padding-left: 0 !important;
            padding-right: 0 !important;
            width: 100% !important;
            max-width: 100% !important;
            flex: none !important;
        }
    }
    
    /* Ultimate fix for text overflow on mobile */
    @media (max-width: 767px) {
        /* Force all text containers to expand */
        .post-detail.post-form,
        .post-detail.post-form *,
        .post-excerpt,
        .post-excerpt *,
        .post-content,
        .post-content *,
        .lead,
        .lead *,
        p,
        p * {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            overflow: visible !important;
            overflow-wrap: break-word !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
            white-space: normal !important;
            hyphens: auto;
            box-sizing: border-box !important;
        }
        
        /* Override any Bootstrap constraints */
        .container,
        .container-fluid {
            max-width: none !important;
            width: 100% !important;
            padding-left: 15px !important;
            padding-right: 15px !important;
        }
        
        /* Force text to wrap */
        .post-excerpt .lead,
        .post-excerpt p.lead {
            display: block !important;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            overflow-wrap: break-word !important;
            word-wrap: break-word !important;
            word-break: break-word !important;
            white-space: normal !important;
            hyphens: auto;
        }
        
        /* Critical fix for excerpt display */
        .post-excerpt,
        .post-excerpt *,
        .post-excerpt .lead,
        .post-excerpt p.lead {
            display: block !important;
            -webkit-line-clamp: unset !important;
            -webkit-box-orient: unset !important;
            overflow: visible !important;
            text-overflow: unset !important;
            white-space: normal !important;
            height: auto !important;
            min-height: fit-content !important;
        }
        
        /* Fix comment form layout completely */
        .comment-form {
            width: 100% !important;
            max-width: 100% !important;
            overflow: visible !important;
        }
        
        .comment-form-header {
            width: 100% !important;
            max-width: 100% !important;
            overflow: visible !important;
        }
        
        .comment-form .row {
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
        }
        
        .comment-form .col-md-4,
        .comment-form .col-md-8 {
            width: 100% !important;
            max-width: 100% !important;
            margin: 0 !important;
            padding: 0 !important;
            flex: none !important;
        }
        
        /* CSS MỚI CHO MOBILE - TRÁNH CONFLICT */
        .comment-form-new {
            width: 100% !important;
            max-width: 100% !important;
            overflow: visible !important;
            padding: 1rem !important;
        }
        
        .comment-form-new .comment-form-header {
            flex-direction: column !important;
            text-align: center !important;
            gap: 0.75rem !important;
            margin-bottom: 1rem !important;
            padding: 1rem !important;
        }
        
        .comment-form-new .comment-form-avatar {
            width: 55px !important;
            height: 55px !important;
            margin: 0 auto 0.75rem auto !important;
            font-size: 1.3rem !important;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3) !important;
        }
        
        .comment-form-new .comment-form-title {
            text-align: center !important;
            width: 100% !important;
        }
        
        .comment-form-new .row {
            gap: 0.75rem !important;
        }
        
        .comment-form-new .col-md-4,
        .comment-form-new .col-md-8 {
            width: 100% !important;
            margin-bottom: 0.75rem !important;
        }
        
        /* CSS MỚI CHO COMMENT ITEM - TRÁNH CONFLICT */
        .comment-item-new {
            background: white !important;
            border-radius: 12px !important;
            padding: 1.5rem !important;
            margin-bottom: 1rem !important;
            box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1) !important;
            border-left: 4px solid #667eea !important;
            transition: all 0.3s ease !important;
            width: 100% !important;
            max-width: 100% !important;
            overflow: visible !important;
        }
        
        .comment-item-new .comment-header {
            display: flex !important;
            align-items: flex-start !important;
            margin-bottom: 1rem !important;
            padding-bottom: 1rem !important;
            border-bottom: 1px solid #e9ecef !important;
            gap: 1rem !important;
        }
        
        .comment-item-new .comment-avatar {
            width: 45px !important;
            height: 45px !important;
            border-radius: 50% !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            margin-right: 1rem !important;
            color: white !important;
            font-weight: 700 !important;
            font-size: 1.1rem !important;
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2) !important;
            flex-shrink: 0 !important;
        }
        
        .comment-item-new .comment-content {
            color: #555 !important;
            line-height: 1.6 !important;
            margin-bottom: 1rem !important;
            width: 100% !important;
            max-width: 100% !important;
            overflow-wrap: break-word !important;
            word-wrap: break-word !important;
        }
        
        .comment-item-new .comment-actions {
            display: flex !important;
            gap: 0.5rem !important;
            margin-bottom: 1rem !important;
            flex-wrap: wrap !important;
        }
        
        /* CSS MOBILE CHO COMMENT ITEM MỚI */
        @media (max-width: 767px) {
            .comment-item-new {
                padding: 1rem !important;
                border-radius: 10px !important;
                margin-bottom: 0.75rem !important;
            }
            
            .comment-item-new .comment-header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 0.5rem !important;
                margin-bottom: 0.75rem !important;
            }
            
            .comment-item-new .comment-avatar {
                width: 40px !important;
                height: 40px !important;
                font-size: 1rem !important;
                margin-right: 0 !important;
            }
            
            .comment-item-new .comment-content {
                margin-bottom: 0.75rem !important;
                font-size: 0.95rem !important;
            }
            
            .comment-item-new .comment-actions {
                gap: 0.4rem !important;
                margin-bottom: 0.75rem !important;
            }
        }
    }
    
    .comment-form {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .comment-form-header {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .comment-form-avatar {
        width: 55px;
        height: 55px;
        margin: 0 auto 0.75rem auto;
        border-radius: 50%;
        font-size: 1.3rem;
        box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        flex-shrink: 0;
        flex-basis: 55px;
        min-width: 55px;
        max-width: 55px;
    }
    
    .comment-form-title {
        text-align: center;
        width: 100%;
        max-width: 100%;
    }
    
    .comment-form .row {
        gap: 0.75rem;
        margin: 0;
        width: 100%;
    }
    
    .comment-form .col-md-4,
    .comment-form .col-md-8 {
        width: 100% !important;
        margin-bottom: 0.75rem;
        padding: 0;
        flex: none;
    }
    
    /* Fix Bootstrap grid conflicts */
    .comment-form .form-control {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .comment-item {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .comment-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .comment-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .btn-like-comment, .btn-dislike-comment {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 70px;
    }
    
    .comment-stats {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: space-between;
    }
    
    /* Related Posts Mobile */
    .related-posts-section {
        padding: 1.5rem;
        margin-top: 1.5rem;
        border-radius: 15px;
    }
    
    .related-posts-title {
        font-size: 1.4rem !important;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
        margin-top: 1rem;
    }
    
    .related-post-item {
        border-radius: 12px;
    }
    
    .related-post-content {
        padding: 1rem;
    }
    
    .related-post-title {
        font-size: 1rem !important;
    }
    
    .related-post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    
    .related-post-stats {
        justify-content: space-between;
        width: 100%;
    }
    
    /* Admin Panel Mobile */
    .admin-panel {
        padding: 1.5rem;
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
    
    .admin-panel h3 {
        font-size: 1.5rem !important;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .post-item {
        padding: 1.5rem;
        border-radius: 15px;
        gap: 1rem;
    }
    
    .post-item h5 {
        font-size: 1.1rem !important;
    }
    
    .post-actions {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .btn-action {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }
    
    /* Forms Mobile */
    .post-form {
        padding: 1.5rem;
        border-radius: 15px;
        margin-top: 1.5rem;
    }
    
    .form-control {
        padding: 0.75rem;
        border-radius: 8px;
        font-size: 1rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 0.875rem;
        border-radius: 20px;
        font-size: 1rem;
    }
    
    /* Footer Mobile */
    .footer {
        padding: 1rem 0;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .team-members {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .team-member {
        padding: 0.5rem 0.75rem;
        border-radius: 10px;
    }
    
    /* Survey Card Mobile */
    .survey-card {
        margin: 0.5rem;
        border-radius: 12px;
    }
    
    .survey-header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .survey-icon {
        width: 45px;
        height: 45px;
    }
    
    .survey-title {
        font-size: 1.1rem !important;
    }
    
    .survey-description {
        font-size: 0.85rem !important;
    }
    
    .survey-content {
        padding: 1rem;
    }
    
    .survey-iframe {
        height: 350px;
        border-radius: 8px;
    }
    
    /* Navigation Arrows Mobile */
    .featured-nav-arrow {
        width: 40px;
        height: 40px;
        display: none; /* Hide on mobile for better UX */
    }
    
    /* Dots Navigation Mobile */
    .featured-dots {
        margin-top: 1rem;
        gap: 0.4rem;
    }
    
    .featured-dot {
        width: 8px;
        height: 8px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .main-content {
        padding-top: 65px;
    }
    
    /* Typography */
    h1, .h1 { font-size: 1.5rem !important; }
    h2, .h2 { font-size: 1.3rem !important; }
    h3, .h3 { font-size: 1.1rem !important; }
    
    /* Featured Posts */
    .featured-post {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .featured-title {
        font-size: 1.3rem !important;
    }
    
    .featured-post-item {
        min-width: 250px;
        padding: 1rem;
        gap: 0.75rem;
    }
    
    .featured-post-title {
        font-size: 1.1rem !important;
    }
    
    .featured-post-image img,
    .featured-post-placeholder {
        height: 120px;
    }
    
    /* Posts */
    .post-card {
        margin: 0;
        border-radius: 12px;
    }
    
    .post-content {
        padding: 0.875rem;
    }
    
    .post-title {
        font-size: 1rem !important;
    }
    
    .post-excerpt {
        font-size: 0.85rem !important;
    }
    
    /* Post Detail */
    .post-detail {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .post-detail .post-title {
        font-size: 1.5rem !important;
    }
    
    .post-detail .post-content {
        font-size: 0.95rem;
    }
    
    /* Social Actions */
    .social-actions {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .btn-like, .btn-comment, .btn-share {
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    /* Comments */
    .comment-section {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .comment-form {
        padding: 0.875rem;
        border-radius: 8px;
    }
    
    .comment-item {
        padding: 0.875rem;
        border-radius: 8px;
    }
    
    .comment-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    
    /* Small mobile pinned badge */
    .pinned-badge {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.75rem !important;
        border-radius: 18px !important;
        margin: 0.75rem auto 0 auto !important;
    }
    
    .btn-like-comment, .btn-dislike-comment {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    /* Related Posts */
    .related-posts-section {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .related-posts-title {
        font-size: 1.2rem !important;
    }
    
    .related-post-content {
        padding: 0.875rem;
    }
    
    .related-post-title {
        font-size: 0.95rem !important;
    }
    
    /* Admin Panel */
    .admin-panel {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .post-item {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .btn-action {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        border-radius: 18px;
    }
    
    /* Forms */
    .post-form {
        padding: 1rem;
        border-radius: 12px;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: visible !important;
        word-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .form-control {
        padding: 0.625rem;
        font-size: 0.95rem;
    }
    
    .btn-submit {
        padding: 0.75rem;
        font-size: 0.95rem;
    }
    
    /* Survey */
    .survey-card {
        margin: 0.25rem;
        border-radius: 10px;
    }
    
    .survey-header {
        padding: 0.875rem;
    }
    
    .survey-icon {
        width: 40px;
        height: 40px;
    }
    
    .survey-title {
        font-size: 1rem !important;
    }
    
    .survey-content {
        padding: 0.875rem;
    }
    
    .survey-iframe {
        height: 300px;
    }
}

    /* Extra Small Mobile Devices */
    @media (max-width: 360px) {
        .container {
            padding-left: 8px;
            padding-right: 8px;
        }
        
        .featured-post-item {
            min-width: 220px;
            padding: 0.875rem;
        }
        
        .featured-post-title {
            font-size: 1rem !important;
        }
        
        .post-content {
            padding: 0.75rem;
        }
        
        .post-detail {
            padding: 0.875rem;
        }
        
        .comment-section {
            padding: 0.875rem;
        }
        
        .comment-form {
            padding: 0.75rem;
        }
        
        .related-posts-section {
            padding: 0.875rem;
        }
        
        .admin-panel {
            padding: 0.875rem;
        }
        
        .post-form {
            padding: 0.875rem;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            overflow: visible !important;
            word-wrap: break-word !important;
            box-sizing: border-box !important;
        }
        
        /* Critical text overflow fixes for very small screens */
        .post-excerpt,
        .post-content,
        .comment-content,
        .featured-excerpt,
        .related-post-excerpt,
        .alert {
            font-size: 0.9rem !important;
            line-height: 1.5 !important;
            padding: 0.75rem !important;
            height: auto !important;
            min-height: fit-content !important;
            overflow: visible !important;
        }
        
        /* Force text wrapping on very small screens */
        .post-content *,
        .comment-content *,
        .post-excerpt * {
            max-width: 100% !important;
            overflow-wrap: break-word !important;
            word-break: break-all !important;
            height: auto !important;
            overflow: visible !important;
        }
        
        /* Ensure all text containers expand properly */
        .post-detail,
        .comment-item,
        .post-card,
        .featured-post,
        .related-post-item {
            height: auto !important;
            min-height: fit-content !important;
            overflow: visible !important;
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
        }
        
        /* Critical text overflow prevention */
        .post-excerpt,
        .post-content,
        .comment-content,
        .featured-excerpt,
        .related-post-excerpt,
        .alert,
        .lead,
        p {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
            overflow-wrap: break-word !important;
            word-wrap: break-word !important;
            word-break: break-all !important;
            white-space: normal !important;
            hyphens: auto;
        }
    }

/* Landscape Mobile Orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .main-content {
        padding-top: 60px;
    }
    
    .navbar {
        padding: 0.25rem 0;
    }
    
    .featured-post-item {
        flex-direction: row;
        gap: 1rem;
    }
    
    .featured-post-image {
        width: 200px;
    }
    
    .featured-post-image img,
    .featured-post-placeholder {
        height: 100px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch targets */
    .btn, .btn-action, .nav-link {
        min-height: 44px;
        min-width: 44px;
    }
    
    .featured-nav-arrow {
        min-height: 48px;
        min-width: 48px;
    }
    
    .featured-dot {
        min-height: 12px;
        min-width: 12px;
    }
    
    /* Remove hover effects on touch devices */
    .post-card:hover,
    .featured-post:hover,
    .comment-item:hover,
    .related-post-item:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    .btn:hover,
    .btn-action:hover,
    .nav-link:hover {
        transform: none;
        box-shadow: inherit;
    }
    
    /* Add active states for touch feedback */
    .btn:active,
    .btn-action:active,
    .nav-link:active {
        transform: scale(0.95);
        transition: transform 0.1s ease;
    }
}

/* High DPI Mobile Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .featured-post-image img,
    .post-image img,
    .related-post-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}



/* Print Styles for Mobile */
@media print {
    .navbar,
    .social-actions,
    .comment-section,
    .related-posts-section,
    .footer {
        display: none !important;
    }
    
    .main-content {
        padding-top: 0 !important;
        background: white !important;
    }
    
    .post-detail {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* Accessibility Improvements for Mobile */
@media (max-width: 767px) {
    /* Improve focus indicators */
    .btn:focus,
    .form-control:focus,
    .nav-link:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
    
    /* Ensure readable font sizes */
    body {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    input, select, textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Performance Optimizations for Mobile */
@media (max-width: 767px) {
    /* Reduce animations on mobile for better performance */
    .post-card,
    .featured-post,
    .comment-item,
    .related-post-item {
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    /* Optimize transforms for mobile */
    .btn:hover,
    .btn-action:hover,
    .nav-link:hover {
        transform: translateY(-1px);
        transition: transform 0.2s ease;
    }
}
