/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

main {
    flex: 1 0 auto;
    padding: 20px;
}

/* Header Styles */
.site-header {
    height: 64px;
    min-height: 64px;
    width: 100%;
    border-bottom: 1px solid #e5e7eb;
    background-color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    flex-shrink: 0;
}

.header-container {
    height: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto; /* This will push the logo to the far left */
}

.mobile-menu-btn {
    display: block;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
}

.mobile-menu-btn img {
    width: 24px;
    height: 24px;
}

.site-logo {
    transition: transform 0.3s ease-in-out;
}

.site-logo:hover {
    transform: scale(1.1);
}

.site-logo img {
    width: 176px;
    height: 36px;
}

/* Navigation */
.main-nav {
    display: none;
    margin: 0;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    align-items: center;
}

.nav-link {
    position: relative;
    height: 64px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #1f2937;
    text-decoration: none;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 500;
    font-family: 'ui-sans-serif', sans-serif, 'Arial', 'Helvetica', 'Verdana', 'Tahoma', 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', 'Geneva', 'Lucida Console', 'Liberation Mono', 'Courier New', 'monospace';
}

.nav-link:hover {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, #2563eb, #60a5fa);
    border-radius: 4px 4px 0 0;
    opacity: 0;
    transform: scaleX(0);
    transition: all 0.2s;
}

.nav-link:hover::after {
    opacity: 0.5;
    transform: scaleX(1);
}

.nav-link.active::after {
    opacity: 1;
    transform: scaleX(1);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 999;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 12px 16px;
    color: #1f2937;
    text-decoration: none;
    transition: background-color 0.3s;
}

.mobile-menu a:hover {
    background-color: #f3f4f6;
    color: #2563eb;
}

/* Language Switcher */
.lang-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 9999px;
    background-color: #9ca3af;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.lang-button:hover {
    background-color: #2563eb;
}

.lang-button img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

.lang-button span {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

/* Footer Styles */
.site-footer {
    flex-shrink: 0;
    width: 100%;
    background-color: #f3f4f6;
    padding: 40px 0;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

.footer-logo {
    width: 80px;
}

.footer-logo img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease-in-out;
}

.footer-logo:hover img {
    transform: scale(1.1);
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.footer-section h2 {
    font-weight: bold;
    font-size: 16px;
    color: #1f2937;
    margin-bottom: 8px;
    margin-top: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.footer-link {
    color: #1f2937;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    white-space: nowrap;
}

.footer-link:hover {
    color: #2563eb;
}

.social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    width: 100%;
}

.social-links {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.social-link {
    width: 46px;
    height: 46px;
    background-color: #9ca3af;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.social-link:hover {
    background-color: #2563eb;
}

.social-link img {
    width: 24px;
    height: 24px;
}

.copyright {
    font-size: 14px;
    color: #1f2937;
    text-align: center;
}

/* Desktop Styles */
@media screen and (min-width: 1025px) {
    .site-header {
        height: 80px;
        min-height: 80px;
    }

    .mobile-menu {
        top: 80px;
    }

    .nav-link {
        height: 80px;
        font-size: 16px;
    }

    .main-nav {
        display: flex;
        gap: 24px;
    }

    .header-container {
        padding: 0 40px;
    }

    .mobile-menu-btn {
        display: none;
    }

    .site-logo img {
        width: 256px;
        height: 36px;
    }

    .footer-grid {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 80px;
    }

    .footer-logo {
        width: 112px;
        flex-shrink: 0;
    }

    .footer-middle {
        display: flex;
        gap: 80px;
        flex: 1;
        justify-content: center;
    }

    .footer-section {
        align-items: flex-start;
        width: auto;
    }

    .footer-links {
        align-items: flex-start;
    }

    .social-section {
        align-items: flex-start;
        width: auto;
        min-width: 250px;
        flex-shrink: 0;
    }

    .social-links {
        justify-content: flex-start;
    }

    .copyright {
        text-align: left;
    }
}



/* Blog Styles */
.blog-main {
    padding: 40px 20px;
}

.blog-container {
    max-width: 1280px;
    margin: 0 auto;
}

/* Blog Header */
.blog-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-header h1 {
    font-size: 36px;
    color: #1f2937;
    margin-bottom: 16px;
}

.blog-description {
    font-size: 18px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Content Layout */
.blog-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 600px; /* Minimum height to push pagination down */
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px; /* Increased gap between cards */
    margin-bottom: auto;
}

/* Blog Card */
.blog-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card-image {
    aspect-ratio: 16/9;
    overflow: hidden;
    background-color: #f3f4f6; /* Light gray background for missing images */
}

/* Add this for cards without images */
.blog-card:not(:has(.blog-card-image)) .blog-card-content {
    padding-top: calc(32px + 16%); /* Regular padding + some extra space */
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Categories */
.blog-categories {
    margin-bottom: 20px;
}

.blog-category {
    background: #f3f4f6;
    color: #4b5563;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
}

/* Card Title */
.blog-card-title {
    font-size: 24px;
    color: #0F71D3;
    margin-bottom: 16px;
    line-height: 1.3;
}

/* Author */
.blog-card-author {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

/* Card Excerpt */
.blog-card-excerpt {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Card Meta */
.blog-card-meta {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #6b7280;
}

.blog-date,
.blog-read-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-card-meta img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Blog Card Author */
.blog-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
    margin-bottom: 12px;
}

.blog-card-author img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Read More Link */
.read-more {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
    margin-left: 4px;
    transition: color 0.2s;
}

.read-more:hover {
    color: #1d4ed8;
}

/* Comments Link */
.blog-comments-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-comments-link:hover {
    color: #2563eb;
}

.blog-comments-link img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* RTL Support */
.rtl .read-more {
    margin-left: 0;
    margin-right: 4px;
}

/* Pagination Styles */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-numbers > * {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 16px;
    line-height: 1;
}

.page-numbers img {
    width: 20px;
    height: 20px;
}

.page-numbers a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.page-numbers .current {
    background: #2563eb;
    color: white;
}

/* RTL Support */
.rtl .page-numbers > * {
    flex-direction: row-reverse;
}

/* Responsive Grid */
@media screen and (min-width: 640px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr); /* Changed to 2 columns for better readability */
        max-width: 1000px; /* Limit maximum width */
        margin-left: auto;
        margin-right: auto;
    }
    
    .blog-card {
        max-width: 100%;
    }
}

/* Single Post Layout */
.single-post-main {
    padding: 40px 20px;
}

.single-layout {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
}

.post-container {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Post Content Layout */
.post-content-wrap {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
}

.post-header {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 40px 0;
    text-align: center;
}

.post-categories {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.post-category {
    background: #e5e7eb;
    color: #4b5563;
    padding: 6px 16px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
}

.post-title {
    font-size: 36px;
    color: #0F71D3;
    margin-bottom: 24px;
    line-height: 1.3;
}

.post-meta {
    display: flex;
    gap: 24px;
    justify-content: center;
    color: #6b7280;
    margin-bottom: 32px;
}

.post-date,
.post-read-time {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
}

.post-meta img {
    width: 20px;
    height: 20px;
    opacity: 0.7;
}

/* Featured Image */
.post-featured-image {
    margin: 40px auto;
    max-width: 1200px;
    padding: 0 40px;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Content */
.post-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    color: #4b5563;
    line-height: 1.8;
    font-size: 18px;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content h2 {
    color: #1f2937;
    font-size: 24px;
    margin: 40px 0 20px;
}

.post-content h3 {
    color: #1f2937;
    font-size: 20px;
    margin: 32px 0 16px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 12px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 32px 0;
}

/* Tags */
.post-tags {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 40px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.post-tag {
    color: #2563eb;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: inline-block;
    margin-right: 8px;
    margin-bottom: 8px;
}

.post-tag:hover {
    color: #1d4ed8;
}

/* RTL support */
.rtl .post-tag {
    margin-right: 0;
    margin-left: 8px;
}

/* Post Navigation */
.post-navigation {
    max-width: 1000px;
    margin: 0 auto;
    padding: 32px 40px;
    border-top: 1px solid #e5e7eb;
}

.post-nav-links {
    display: flex;
    justify-content: space-between;
    gap: 24px;
}

.post-nav-link {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: #4b5563;
    transition: color 0.3s;
    max-width: 280px;
}

.post-nav-link:hover {
    color: #2563eb;
}

.post-nav-link img {
    width: 24px;
    height: 24px;
}

.post-nav-content {
    display: flex;
    flex-direction: column;
}

.post-nav-label {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 4px;
}

.post-nav-title {
    font-size: 16px;
    font-weight: 500;
}

/* RTL Support */
.rtl .post-content {
    text-align: right;
}



/* Responsive Design */
@media screen and (max-width: 768px) {
    .post-container {
        border-radius: 0;
    }

    .post-header {
        padding: 24px 24px 0;
    }

    .post-title {
        font-size: 28px;
    }

    .post-content-wrap,
    .post-content,
    .post-tags,
    .post-navigation,
    .post-comments {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .post-featured-image {
        padding: 0;
        margin: 24px auto;
    }

    .post-nav-links {
        flex-direction: column;
    }

    .post-nav-link {
        max-width: none;
    }
}

/* Comments Section Styles */
.post-comments {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-top: 1px solid #e5e7eb;
    background-color: white;
}

.comments-title {
    font-size: 24px;
    color: #1f2937;
    margin-bottom: 32px;
    font-weight: 600;
    padding-bottom: 16px;
    border-bottom: 2px solid #e5e7eb;
}

/* Comments List */
.comments-list {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Individual Comment */
.comment-item {
    display: flex;
    gap: 20px;
    padding: 24px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Comment Avatar */
.comment-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Comment Content */
.comment-content {
    flex: 1;
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.comment-author {
    font-weight: 600;
    color: #1f2937;
    max-width: 100%;
    overflow-wrap: break-word;
}

.comment-specialty {
    color: #6b7280;
    font-size: 14px;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 4px;
}

.comment-date {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #6b7280;
    font-size: 14px;
}

.comment-date img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Comment Text */
.comment-text {
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 12px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* Comment Form */
.comment-respond {
    margin-bottom: 48px;
}

.comment-reply-title {
    font-size: 20px;
    color: #1f2937;
    margin-bottom: 24px;
    font-weight: 600;
}

.comment-notes {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 24px;
}

.required {
    color: #dc2626;
    margin-left: 4px;
}

.comment-form {
    display: grid;
    gap: 20px;
}

.comment-form-author,
.comment-form-email,
.comment-form-specialty,
.comment-form-comment {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #f9fafb;
    transition: border-color 0.3s, box-shadow 0.3s;
    font-size: 16px;
    color: #1f2937;
}

.comment-form textarea {
    min-height: 120px;
    resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.comment-form label {
    color: #4b5563;
    font-weight: 500;
    font-size: 16px;
}

.comment-submit-btn {
    background: #2563eb;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    justify-self: start;
}

.comment-submit-btn:hover {
    background: #1d4ed8;
}

/* Comment Navigation */
.comment-navigation {
    margin: 32px 0;
    padding: 16px 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.page-numbers {
    padding: 8px 16px;
    border-radius: 6px;
    background: white;
    border: 1px solid #e5e7eb;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
}

.page-numbers.current {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.page-numbers:hover:not(.current) {
    background: #f3f4f6;
    border-color: #d1d5db;
}

/* Comment States */
.comment-awaiting-moderation {
    background: #fef3c7;
    color: #92400e;
    padding: 12px;
    border-radius: 6px;
    margin-top: 16px;
    font-size: 14px;
}

.comment-form .error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 4px;
}

/* RTL Support */
.rtl .comment-item {
    flex-direction: row-reverse;
}

.rtl .comment-meta {
    flex-direction: row-reverse;
}

.rtl .comment-actions {
    flex-direction: row-reverse;
}

.rtl .required {
    margin-left: 0;
    margin-right: 4px;
}

.rtl .comment-item .children {
    margin-left: 0;
    margin-right: 80px;
}

.rtl .nav-previous img {
    transform: scaleX(-1);
}

.rtl .nav-next img {
    transform: scaleX(-1);
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .single-layout {
        flex-direction: column;
    }
    
    .post-container {
        width: 100%;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 32px;
    }
}

@media screen and (max-width: 768px) {
    .comment-item {
        padding: 16px;
    }
}

/* Comment Reply Styles */
.comment-replies {
    margin-left: 80px; /* Space for nested comments */
    margin-top: 24px;
}

.comment-replies .comment-item {
    background: #ffffff; /* Lighter background for replies */
    border-left: 3px solid #2563eb; /* Blue line to indicate replies */
}

/* Reply Button */
.comment-actions {
    margin-top: 16px;
}

.comment-reply-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f3f4f6;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.comment-reply-link:hover {
    background: #e5e7eb;
    color: #2563eb;
}

.comment-reply-link:before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background: url('../assets/icons/reply-icon.svg') no-repeat center;
    background-size: contain;
    opacity: 0.7;
}

/* RTL Support for Replies */
.rtl .comment-replies {
    margin-left: 0;
    margin-right: 80px;
}

.rtl .comment-replies .comment-item {
    border-left: none;
    border-right: 3px solid #2563eb;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .comment-replies {
        margin-left: 40px;
    }
    
    .rtl .comment-replies {
        margin-left: 0;
        margin-right: 40px;
    }
}

@media screen and (max-width: 480px) {
    .comment-replies {
        margin-left: 20px;
    }
    
    .rtl .comment-replies {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* Comment Replies Toggle */
.comment-replies-toggle {
    margin-top: 12px;
    margin-left: 80px;
}

.toggle-replies {
    background: none;
    border: none;
    color: #2563eb;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-replies:hover {
    background: #f3f4f6;
}

.toggle-replies::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url('../assets/icons/chevron-right.svg');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.2s;
}

.toggle-replies[data-expanded="true"]::before {
    transform: rotate(90deg);
}

/* RTL Support */
.rtl .comment-replies-toggle {
    margin-left: 0;
    margin-right: 80px;
}

.rtl .toggle-replies::before {
    transform: scaleX(-1);
}

.rtl .toggle-replies[data-expanded="true"]::before {
    transform: scaleX(-1) rotate(-90deg);
}

@media screen and (max-width: 768px) {
    .comment-replies-toggle {
        margin-left: 40px;
    }
    
    .rtl .comment-replies-toggle {
        margin-left: 0;
        margin-right: 40px;
    }
}

@media screen and (max-width: 480px) {
    .comment-replies-toggle {
        margin-left: 20px;
    }
    
    .rtl .comment-replies-toggle {
        margin-left: 0;
        margin-right: 20px;
    }
}

/* Blog Search */
.blog-search {
    max-width: 600px;
    margin: 32px auto 0;
    padding: 0 20px;
}

.search-form {
    display: flex;
    gap: 12px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 16px;
    color: #1f2937;
    background: transparent;
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-submit {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-submit:hover {
    background: #1d4ed8;
}

.search-submit img {
    width: 20px;
    height: 20px;
    color: white;
}

/* Search Results */
.search-results-header {
    text-align: center;
    margin-bottom: 32px;
    color: #4b5563;
    font-size: 18px;
}

.search-term {
    color: #2563eb;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 48px 20px;
}

.no-results img {
    width: 120px;
    height: 120px;
    margin-bottom: 24px;
    opacity: 0.5;
}

.no-results h2 {
    color: #1f2937;
    font-size: 24px;
    margin-bottom: 12px;
}

.no-results p {
    color: #6b7280;
    font-size: 16px;
}

/* RTL Support */
.rtl .search-submit {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media screen and (max-width: 640px) {
    .search-form {
        flex-direction: column;
    }

    .search-submit,
    .search-reset {
        width: 100%;
        justify-content: center;
    }

    .rtl .search-form {
        flex-direction: column;
    }
}

/* Add styles for reset button */
.search-reset {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-reset:hover {
    background: #dc2626;
}

.search-reset img {
    width: 20px;
    height: 20px;
    color: white;
}

/* RTL Support */
.rtl .search-reset {
    flex-direction: row-reverse;
}

/* Blog Layout with Sidebar */
.blog-container,
.post-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 32px;
}

.blog-content {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 84px; /* header height + 20px */
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    margin-bottom: 24px;
}

.widget-title {
    font-size: 1.25rem;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
}

.recent-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recent-post-item {
    padding: 16px;
    border-radius: 8px;
    transition: background-color 0.2s;
    border-bottom: 1px solid #e5e7eb;
}

.recent-post-item:last-child {
    border-bottom: none;
}

.recent-post-item:hover {
    background-color: #f9fafb;
}

.recent-post-title {
    color: #0F71D3;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.recent-post-title:hover {
    color: #2563eb;
}

.recent-post-date {
    display: block;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.recent-post-date img {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Responsive Design */
@media screen and (max-width: 1024px) {
    .blog-container,
    .post-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        margin-top: 32px;
    }
}

/* Pagination Styles */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-numbers > * {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 16px;
    line-height: 1;
}

.page-numbers img {
    width: 20px;
    height: 20px;
}

.page-numbers a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

.page-numbers .current {
    background: #2563eb;
    color: white;
}

/* RTL Support */
.rtl .page-numbers > * {
    flex-direction: row-reverse;
}

/* Responsive */
@media screen and (max-width: 640px) {
    .page-numbers {
        gap: 4px;
    }

    .page-numbers > * {
        padding: 8px 12px;
        font-size: 14px;
    }
}

/* Post Navigation Disabled State */
.post-nav-link.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.post-nav-link.disabled .post-nav-content {
    opacity: 0.7;
}

.post-nav-link.disabled .post-nav-label {
    color: #9ca3af;
}

.post-nav-link.disabled .post-nav-title {
    color: #6b7280;
}

.post-nav-link.disabled img {
    opacity: 0.4;
}

