/* ============================================
   BLOGS PAGE STYLES
   ============================================ */

/* Core Responsive Layout */
.blog-main-bg {
    background: linear-gradient(135deg, #f2f7fc 0%, #e3edfa 100%);
    min-height: 100vh;
    padding-top: 120px !important; /* Account for fixed header (40px mini-header + 80px navbar) */
    padding-bottom: 3rem;
    position: relative;
    margin-top: 0 !important; /* Ensure no negative margin */
}

/* Blog Detail Page Specific - Already has padding-top from .blog-main-bg */

.blog-container {
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    margin: auto;
    max-width: 1320px;
    padding: 2rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.blog-content {
    flex: 1 1 0%;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(23, 96, 187, 0.12);
    padding: 3rem 2.5rem;
    min-width: 0;
    min-height: 430px;
    box-sizing: border-box;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    position: relative;
    z-index: 2;
    transition: box-shadow 0.3s ease;
}

.blog-content:hover {
    box-shadow: 0 12px 50px rgba(23, 96, 187, 0.15);
}

.blog-sidebar {
    width: 330px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(23, 96, 187, 0.12);
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    box-sizing: border-box;
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    position: sticky;
    top: 2rem;
}

.blog-list-row {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

/* Blog Card Styles */
.custom-blog-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    padding: 1.5rem;
    margin-bottom: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 2rem;
    width: 100%;
    box-sizing: border-box;
    border: 1.5px solid #e3edfa;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out both;
}

.custom-blog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.custom-blog-card:hover::before {
    transform: scaleY(1);
}

.custom-blog-card:hover {
    box-shadow: 0 15px 50px rgba(23, 96, 187, 0.2);
    transform: translateY(-5px);
    border-color: #1760bb;
}

.custom-blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.custom-blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.custom-blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.custom-blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

.custom-blog-card-img {
    flex: 0 0 320px;
    width: 320px;
    height: 200px;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(135deg, #e3edfa 0%, #f2f7fc 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    position: relative;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    transition: all 0.4s ease;
}

.custom-blog-card:hover .custom-blog-card-img {
    box-shadow: 0 8px 25px rgba(23, 96, 187, 0.25);
}

.custom-blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 16px;
    display: block;
    background: linear-gradient(135deg, #e3edfa 0%, #f2f7fc 100%);
}

.custom-blog-card:hover .custom-blog-card-img img {
    transform: scale(1.05);
}

.blog-cat-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: inline-block;
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.3);
    z-index: 2;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.blog-cat-badge[data-color="ai"] {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
}

.blog-cat-badge[data-color="web"] {
    background: linear-gradient(135deg, #fa8351 0%, #e8693a 100%);
}

.blog-cat-badge[data-color="seo"] {
    background: linear-gradient(135deg, #aa49f5 0%, #8b2dd4 100%);
}

.blog-cat-badge[data-color="app"] {
    background: linear-gradient(135deg, #1eba68 0%, #159a52 100%);
}

.custom-blog-card-content {
    flex: 1 1 0%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    padding: 0.5rem 0;
}

/* Only apply to blog page content, not header mega menu */
.blog-main-bg .blog-card-title,
.blog-content .blog-card-title {
    font-size: 1.6rem !important;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    letter-spacing: -0.3px;
    text-decoration: none;
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-main-bg .blog-card-title:hover,
.blog-content .blog-card-title:hover {
    color: #1760bb;
    text-decoration: none;
    transform: translateX(3px);
}

.blog-card-meta-row {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-weight: 500;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-card-meta i {
    color: #1760bb;
    font-size: 1rem;
    opacity: 0.8;
}

.blog-card-meta span {
    color: inherit;
    font-size: inherit;
}

.blog-card-excerpt {
    color: #495057;
    font-size: 1.05rem;
    margin-bottom: 0;
    font-weight: 400;
    margin-top: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.7;
}

.vertical-divider {
    width: 96%;
    margin: 2rem auto;
    border: none;
    border-top: 2px solid;
    border-image: linear-gradient(90deg, #e3edfa 0%, #1760bb 50%, #e3edfa 100%) 1;
    opacity: 0.6;
    background: none;
    height: 0;
}

.custom-blog-card:last-child ~ .vertical-divider {
    display: none;
}

/* Blog Detail Page Specific Styles */
.blog-detail-image {
    width: 100%;
    height: 420px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
    border: 1.5px solid #e3edfa;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.15);
    transition: transform 0.4s ease;
}

.blog-detail-image:hover {
    transform: scale(1.02);
}

.blog-detail-title {
    font-size: 2.75rem;
    color: #2c3e50;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.blog-detail-meta-row {
    display: flex;
    align-items: center;
    gap: 2rem;
    color: #6c757d;
    margin-bottom: 2rem;
    font-size: 1rem;
    flex-wrap: wrap;
}

.blog-detail-meta-row span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-detail-meta-row i {
    color: #1760bb;
    opacity: 0.8;
    font-size: 1.1rem;
}

.blog-detail-content {
    color: #495057;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    word-break: break-word;
    font-size: 1.1rem;
}

.blog-detail-content p {
    margin-bottom: 1.25rem;
}

.blog-detail-content b,
.blog-detail-content strong {
    color: #2c3e50;
    font-weight: 700;
}

.blog-detail-content ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.blog-detail-content li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.blog-tags-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.blog-tag-badge {
    background: rgba(23, 96, 187, 0.1);
    color: #1760bb;
    padding: 0.5rem 1.25rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1.5px solid rgba(23, 96, 187, 0.2);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.1);
}

.blog-tag-badge:hover,
.blog-tag-badge:focus:not(:focus-visible) {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.3);
    border-color: #1760bb;
    outline: none !important;
}

.blog-tag-badge:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.blog-category-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.1) 0%, rgba(16, 80, 158, 0.08) 100%);
    color: #1760bb;
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: 12px;
    padding: 0.4rem 1rem;
    margin-left: 0.75rem;
    border: 1.5px solid rgba(23, 96, 187, 0.2);
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.15);
    transition: all 0.3s ease;
}

.blog-category-badge i {
    margin-right: 0.5rem;
    color: #1760bb;
    font-size: 0.9rem;
}

/* Author Section */
.author-section {
    display: flex;
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 16px;
    padding: 2rem 1.75rem;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e3edfa;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    transition: transform 0.3s ease;
}

.author-section:hover .author-img {
    transform: scale(1.05);
}

.author-details {
    flex: 1;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.author-bio {
    color: #6c757d;
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Previous/Next Navigation */
.blog-prev-next-row {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.blog-prev-next-card {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 16px;
    min-width: 0;
    gap: 1rem;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1.25rem 1.5rem;
    flex: 1 1 0;
    border: 1.5px solid #e3edfa;
    position: relative;
    overflow: hidden;
}

.blog-prev-next-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s ease;
}

.blog-prev-next-card:hover::before {
    transform: scaleY(1);
}

.blog-prev-next-card:hover {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    transform: translateY(-5px);
    text-decoration: none;
    outline: none;
    box-shadow: 0 15px 50px rgba(23, 96, 187, 0.2);
    border-color: #1760bb;
}

.blog-prev-next-content {
    flex: 1;
    min-width: 0;
}

.blog-next-card {
    flex-direction: row-reverse;
    text-align: right;
}

.blog-next-card .blog-prev-next-content {
    text-align: right;
}

@media (max-width: 767.98px) {
    .blog-next-card {
        flex-direction: row;
    }
    .blog-next-card .blog-prev-next-content {
        text-align: left;
    }
}


.blog-prev-next-img {
    width: 90px;
    height: 70px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid #e3edfa;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.1);
    transition: transform 0.4s ease;
}

.blog-prev-next-card:hover .blog-prev-next-img {
    transform: scale(1.05);
}

.blog-prev-next-title {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1.05rem;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.4;
    max-width: 200px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    word-break: break-word;
}

.prev-label, .next-label {
    font-size: 0.9rem;
    display: block;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.prev-label i, .next-label i {
    color: #1760bb;
}

/* Comments Section */
.comments-section {
    margin-bottom: 2.5rem;
}

.comment-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.comment-heading::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    border-radius: 2px;
}

.comment-list {
    margin: 0 0 1.5rem 0;
    padding: 0;
    list-style: none;
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease-out both;
}

.comment-item:nth-child(1) { animation-delay: 0.1s; }
.comment-item:nth-child(2) { animation-delay: 0.2s; }
.comment-item:nth-child(3) { animation-delay: 0.3s; }
.comment-item:nth-child(4) { animation-delay: 0.4s; }
.comment-item:nth-child(5) { animation-delay: 0.5s; }

.comment-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 2px;
    border: 2px solid #e3edfa;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    transition: transform 0.3s ease;
}

.comment-item:hover .comment-avatar {
    transform: scale(1.1);
}

.comment-body {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    flex: 1;
    box-shadow: 0 4px 20px rgba(23, 96, 187, 0.1);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    transition: all 0.3s ease;
}

.comment-item:hover .comment-body {
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.15);
    border-color: rgba(23, 96, 187, 0.2);
}

.comment-author {
    color: #1760bb;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.comment-date {
    color: #9ca3af;
    font-size: 0.9rem;
    margin-left: 0.5rem;
}

.comment-text {
    color: #495057;
    font-size: 1.05rem;
    margin-top: 0.5rem;
    line-height: 1.7;
}

/* Add Comment Section */
.add-comment-section {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    margin-top: 2rem;
}

.add-comment-title {
    color: #2c3e50;
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-comment-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    border-radius: 2px;
}

.reply-btn {
    background: rgba(23, 96, 187, 0.1);
    border: 1.5px solid rgba(23, 96, 187, 0.2);
    color: #1760bb;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.1);
}

.reply-btn:hover,
.reply-btn:focus:not(:focus-visible) {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.3);
    transform: translateY(-2px);
    border-color: #1760bb;
    outline: none !important;
}

.reply-btn:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.reply-form-section {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 16px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    padding: 1.5rem 1.75rem;
    box-shadow: 0 8px 30px rgba(23, 96, 187, 0.1);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    display: none; /* Hide by default for JS */
}

.reply-form-section.active {
    display: block !important;
    animation: fadeInUp 0.4s ease-out;
}

.reply-form-section .form-group {
    margin-bottom: 1.25rem;
}

.reply-form-section label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.reply-form-section input, .reply-form-section textarea {
    width: 100%;
    border-radius: 10px;
    border: 1.5px solid #e3edfa;
    font-size: 1rem;
    color: #495057;
    padding: 0.75rem 1rem;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    resize: vertical;
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.05);
    font-family: inherit;
}

.reply-form-section input::placeholder,
.reply-form-section textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

.reply-form-section textarea {
    min-height: 100px;
}

.reply-form-section input:focus, .reply-form-section textarea:focus {
    border-color: #1760bb;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    background: #ffffff;
    outline: none;
    transform: translateY(-1px);
}

.reply-form-section button[type="submit"] {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    border: none;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.3);
}

.reply-form-section button[type="submit"]:hover,
.reply-form-section button[type="submit"]:focus:not(:focus-visible) {
    background: linear-gradient(135deg, #10509e 0%, #1760bb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 96, 187, 0.4);
    outline: none !important;
    border: none !important;
}

.reply-form-section button[type="submit"]:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.add-comment-form .form-group {
    margin-bottom: 1.5rem;
}

.add-comment-form label {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    display: block;
}

.add-comment-form input,
.add-comment-form textarea {
    width: 100%;
    border-radius: 10px;
    border: 1.5px solid #e3edfa;
    font-size: 1rem;
    color: #495057;
    padding: 0.75rem 1rem;
    outline: none;
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    resize: vertical;
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.05);
    font-family: inherit;
}

.add-comment-form input::placeholder,
.add-comment-form textarea::placeholder {
    color: #9ca3af;
    opacity: 0.8;
}

.add-comment-form textarea {
    min-height: 120px;
    max-height: 250px;
}

.add-comment-form input:focus, .add-comment-form textarea:focus {
    border-color: #1760bb;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.15);
    background: #ffffff;
    outline: none;
    transform: translateY(-1px);
}

.add-comment-form button {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: 10px;
    border: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(23, 96, 187, 0.3);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.add-comment-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.add-comment-form button:hover::before {
    width: 300px;
    height: 300px;
}

.add-comment-form button:hover,
.add-comment-form button:focus:not(:focus-visible) {
    background: linear-gradient(135deg, #10509e 0%, #1760bb 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(23, 96, 187, 0.4);
    outline: none !important;
    border: none !important;
}

.add-comment-form button:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Sidebar Styles */
.sidebar-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: none;
    border: 1.5px solid transparent;
    outline: none;
}

.sidebar-cat-item:hover,
.sidebar-cat-item.active,
.sidebar-cat-item:focus:not(:focus-visible) {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.1) 0%, rgba(16, 80, 158, 0.05) 100%);
    color: #1760bb;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.1);
    border-color: rgba(23, 96, 187, 0.2);
    transform: translateX(5px);
    outline: none !important;
}

.sidebar-cat-item:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.sidebar-cat-count {
    background: rgba(23, 96, 187, 0.1);
    color: #1760bb;
    font-size: 0.875rem;
    font-weight: 700;
    min-width: 32px;
    border-radius: 10px;
    padding: 0.25rem 0.75rem;
    text-align: center;
    line-height: 1.2;
    margin-left: 1em;
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.15);
    transition: all 0.3s ease;
}

.sidebar-cat-item.active .sidebar-cat-count,
.sidebar-cat-item:hover .sidebar-cat-count {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(23, 96, 187, 0.3);
}

.sidebar-search-bar {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.05) 0%, rgba(16, 80, 158, 0.03) 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.08);
    padding: 0.75rem 1rem;
    height: auto;
    min-height: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(23, 96, 187, 0.1);
    position: relative;
    box-sizing: border-box;
}

.sidebar-search-bar:focus-within {
    background: linear-gradient(135deg, rgba(23, 96, 187, 0.1) 0%, rgba(16, 80, 158, 0.08) 100%);
    border-color: #1760bb;
    box-shadow: 0 8px 25px rgba(23, 96, 187, 0.15);
    transform: translateY(-2px);
}

.sidebar-search-bar input[type="search"] {
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: #2c3e50;
    font-weight: 500;
    padding: 0;
    width: 100%;
    transition: color 0.3s ease;
}

.sidebar-search-bar input[type="search"]:focus {
    outline: none;
}

.sidebar-search-bar input[type="search"]::placeholder {
    color: #9ca3af;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.sidebar-search-bar i.bi-search {
    color: #1760bb;
    opacity: 0.8;
    font-size: 1.25rem;
    margin-left: 0.75rem;
    transition: all 0.3s ease;
    pointer-events: none;
}

.sidebar-search-bar:focus-within i.bi-search {
    color: #1760bb;
    opacity: 1;
    transform: scale(1.1);
}

.sidebar-tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.sidebar-tag {
    display: inline-block;
    background: rgba(23, 96, 187, 0.1);
    color: #1760bb;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid rgba(23, 96, 187, 0.2);
    position: relative;
}

.sidebar-tag:hover,
.sidebar-tag:focus:not(:focus-visible) {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(23, 96, 187, 0.3);
    border-color: #1760bb;
    outline: none !important;
    text-decoration: none;
}

.sidebar-tag:focus-visible {
    outline: 2px solid #1760bb;
    outline-offset: 2px;
    border-radius: 4px;
}

.sidebar-tags-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-tags-title i {
    font-size: 1.3rem;
}

/* Pagination Styling */
.blog-pagination-nav {
    margin-top: 2.5rem;
    text-align: center;
}

.pagination {
    gap: 0.5rem;
}

.pagination .page-link {
    color: #1760bb;
    background: #ffffff;
    border: 1.5px solid #e3edfa;
    border-radius: 10px;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(23, 96, 187, 0.1);
}

.pagination .page-link:hover {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    border-color: #1760bb;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.2);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #1760bb 0%, #10509e 100%);
    color: #fff;
    border-color: #1760bb;
    box-shadow: 0 4px 15px rgba(23, 96, 187, 0.3);
}

.pagination .page-item.disabled .page-link {
    background: #f8f9fa;
    color: #9ca3af;
    border-color: #e3edfa;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
    .blog-container {
        max-width: 98vw;
        padding: 0 1vw;
        gap: 2rem;
    }
    .blog-sidebar {
        width: 280px;
        padding: 1.7rem 1.1rem;
    }
    .custom-blog-card-img {
        width: 100%;
        max-width: 250px;
        min-width: 120px;
        height: 145px;
    }
    .custom-blog-card-img img {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: cover;
        border-radius: 13px;
    }
}

@media (max-width: 991.98px) {
    .blog-main-bg {
        padding-top: 110px !important; /* Slightly less on tablets */
    }
    
    .blog-container {
        flex-direction: column;
        max-width: 100vw;
        padding: 0 1rem;
        gap: 1.5rem;
    }
    .blog-sidebar {
        width: 100%;
        flex-direction: row;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        position: static;
        margin-top: 0;
        border-radius: 20px;
        flex-wrap: wrap;
    }
    .blog-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }
    .blog-sidebar-section {
        flex: 1 1 calc(50% - 0.75rem);
        min-width: 200px;
    }
    .custom-blog-card {
        flex-direction: column;
        gap: 0;
    }
    .custom-blog-card-img {
        width: 100%;
        min-width: 100px;
        max-width: 100%;
        height: 220px;
        border-radius: 16px 16px 0 0;
    }
    .custom-blog-card-img img {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: cover;
        border-radius: 16px 16px 0 0;
    }
    .custom-blog-card-content {
        padding: 1.5rem 1rem;
    }
    .blog-detail-image {
        height: 280px;
        border-radius: 16px;
    }
    .blog-detail-title {
        font-size: 2rem;
    }
}

@media (max-width: 767.98px) {
    .blog-main-bg {
        padding-top: 120px !important; /* Account for mobile header (auto mini-header ~50px + 80px navbar) */
    }
    
    .blog-content {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }
    .blog-sidebar {
        padding: 1.5rem 1rem;
        flex-direction: column;
        width: 100%;
        gap: 1.5rem;
        min-width: 0;
        border-radius: 20px;
    }
    .blog-sidebar-section {
        width: 100%;
        flex: 1 1 100%;
    }
    .custom-blog-card {
        padding: 1rem;
        border-radius: 16px;
    }
    .custom-blog-card-img {
        width: 100%;
        min-width: 80px;
        max-width: 100%;
        height: 200px;
        border-radius: 12px 12px 0 0;
    }
    .custom-blog-card-img img {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        object-fit: cover;
        border-radius: 12px 12px 0 0;
    }
    .custom-blog-card-content {
        padding: 1rem 0.5rem;
    }
    .blog-cat-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.875rem;
        top: 0.75rem;
        left: 0.75rem;
        border-radius: 10px;
    }
    .blog-main-bg .blog-card-title,
    .blog-content .blog-card-title {
        font-size: 1.35rem;
    }
    .blog-detail-image {
        height: 220px;
    }
    .blog-detail-title {
        font-size: 1.75rem;
    }
    .author-section {
        padding: 1.5rem 1.25rem;
    }
    .blog-prev-next-row {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    .blog-prev-next-card {
        flex-direction: row !important;
        width: 100%;
        padding: 1rem;
        align-items: flex-start;
        gap: 0.875rem;
        flex: 1 1 100%;
    }
    .blog-next-card {
        flex-direction: row !important;
    }
    .blog-next-card .blog-prev-next-content {
        text-align: left !important;
    }
    .blog-prev-next-img {
        width: 70px;
        height: 60px;
        flex-shrink: 0;
        border-radius: 10px;
    }
    .blog-prev-next-content {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }
    .blog-prev-next-title {
        max-width: 100% !important;
        white-space: normal !important;
        font-size: 0.9rem;
        line-height: 1.4;
        overflow: visible;
        text-overflow: clip;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
    }
    .prev-label, .next-label {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
        display: block;
    }
}

@media (max-width: 575.98px) {
    .blog-main-bg {
        padding: 2rem 0;
    }
    .blog-content {
        padding: 1.5rem 1rem;
        min-height: 0;
        border-radius: 16px;
    }
    .blog-sidebar {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        gap: 1.5rem;
    }
    .custom-blog-card-img {
        width: 100%;
        min-width: 50px;
        max-width: 100%;
        height: 120px;
        border-radius: 10px 10px 0 0;
    }
    .custom-blog-card-img img {
        width: 100%;
        height: 100%;
        min-width: 0;
        min-height: 0;
        border-radius: 10px 10px 0 0;
        object-fit: cover;
    }
    .custom-blog-card {
        box-shadow: 0 4px 15px rgba(23, 96, 187, 0.08);
        gap: 0;
        padding: 1rem;
        border-radius: 16px;
    }
    .blog-cat-badge {
        font-size: 0.74em;
        padding: 0.16em 0.64em;
        top: 5px;
        left: 5px;
        border-radius: 12px;
    }
    .blog-main-bg .blog-card-title,
    .blog-content .blog-card-title,
    .blog-main-bg .blog-card-title:hover,
    .blog-content .blog-card-title:hover {
        font-size: 1.15rem;
        font-weight: 700;
    }
    .blog-card-meta-row {
        font-size: 0.92rem;
        gap: 0.5em;
    }
    .sidebar-cat-item {
        font-size: 0.96rem;
        padding: 0.34em 0.45em 0.34em 0.5em;
    }
    .sidebar-cat-count {
        font-size: 0.95em;
        min-width: 24px;
        padding: 1.5px 7px 1.5px 7px;
    }
    .sidebar-tag-list {
        gap: 6px 7px;
    }
    .sidebar-tag {
        font-size: 0.91em;
        padding: 0.21em 0.71em;
        border-radius: 13px;
        margin-bottom: 2px;
    }
    .blog-content {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }
    .blog-sidebar {
        padding: 1.25rem 1rem;
        border-radius: 16px;
    }
    .blog-detail-image {
        height: 180px;
        border-radius: 12px;
    }
    .blog-detail-title {
        font-size: 1.5rem;
    }
    .author-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .blog-prev-next-row {
        flex-direction: column;
        gap: 0.875rem;
    }
    .blog-prev-next-card {
        flex-direction: row !important;
        width: 100%;
        padding: 0.875rem;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .blog-next-card {
        flex-direction: row !important;
    }
    .blog-next-card .blog-prev-next-content {
        text-align: left !important;
    }
    .blog-prev-next-img {
        width: 65px;
        height: 55px;
        flex-shrink: 0;
    }
    .blog-prev-next-content {
        flex: 1;
        min-width: 0;
    }
    .blog-prev-next-title {
        font-size: 0.875rem;
        line-height: 1.4;
        max-width: 100% !important;
        white-space: normal !important;
        overflow: visible;
        text-overflow: clip;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        word-break: break-word;
    }
    .prev-label, .next-label {
        font-size: 0.75rem;
        margin-bottom: 0.35rem;
    }
    .author-img {
        width: 60px;
        height: 60px;
    }
    .comment-avatar {
        width: 40px;
        height: 40px;
    }
}

/* Extra responsiveness for xs screens */
@media (max-width: 400px) {
    .custom-blog-card-img {
        width: 100%;
        min-width: 30px;
        max-width: 100%;
        height: 85px !important;
        border-radius: 8px 8px 0 0 !important;
    }
    .custom-blog-card-img img {
        width: 100%;
        height: 100% !important;
        min-height: 0 !important;
        min-width: 0 !important;
        border-radius: 8px 8px 0 0 !important;
        object-fit: cover;
    }
    .blog-sidebar {
        padding: 1.25rem 1rem;
    }
}

/* Allow horizontal scrolling on xs screens if overflow */
@media (max-width: 350px) {
    .blog-container {
        padding: 0 0.75rem;
    }
    .blog-content, .blog-sidebar {
        padding: 1.25rem 0.75rem;
    }
    .custom-blog-card {
        padding: 0.75rem;
    }
    .blog-main-bg .blog-card-title,
    .blog-content .blog-card-title {
        font-size: 1.1rem;
    }
    .blog-detail-title {
        font-size: 1.4rem;
    }
}

/* ============================================
   CSS OPTIMIZATION COMPLETE
   - Fixed focus outline issues (removed unwanted borders on click)
   - Added focus-visible for keyboard navigation accessibility
   - Optimized animations and transitions
   - Professional, clean & smooth design maintained
   ============================================ */

