.blog-container {
    padding: 100px 20px 40px;
    background-color: #f9f9f9;
    min-height: 100vh;
}

.blog-layout {
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    height: auto;
    align-items: start;
}

/* Featured Blog Styles */
.featured-blog {
    margin-top: 30px;
    background: white;
    border-radius: 15px;
    /* overflow: hidden; */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow-y: auto !important;
    width: 70%;
    /* overflow-x: hidden !important; */
    overflow: hidden !important;
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
}

.featured-blog:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.featured-image-container {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.featured-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.featured-category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #009d9a;
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-content {
    padding: 40px;
    overflow-x: hidden;
}

.featured-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.featured-meta span {
    color: #009d9a;
    font-weight: 600;
}

.featured-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
    margin-bottom: 20px;
}

.featured-excerpt {
    color: #666;
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.featured-full-content {
    color: #333;
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 30px;
    overflow-x: hidden;
    word-wrap: break-word;
}

.featured-full-content h1,
.featured-full-content h2,
.featured-full-content h3,
.featured-full-content h4,
.featured-full-content h5,
.featured-full-content h6 {
    color: #333;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.featured-full-content h1 {
    font-size: 28px;
}

.featured-full-content h2 {
    font-size: 24px;
}

.featured-full-content h3 {
    font-size: 20px;
}

.featured-full-content h4 {
    font-size: 18px;
}

.featured-full-content h5 {
    font-size: 16px;
}

.featured-full-content h6 {
    font-size: 14px;
}

.featured-full-content p {
    margin-bottom: 15px;
}

.featured-full-content ul,
.featured-full-content ol {
    margin: 15px 0;
    padding-left: 30px;
}

.featured-full-content li {
    margin-bottom: 8px;
}

.featured-full-content blockquote {
    border-left: 4px solid #009d9a;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.featured-full-content img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
    object-fit: contain;
    box-sizing: border-box;
}

/* Ensure all images in rich text are responsive */
.featured-full-content p img,
.featured-full-content div img,
.featured-full-content figure img,
.featured-full-content span img,
.featured-full-content a img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
}

/* Responsive images in tables */
.featured-full-content table img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    box-sizing: border-box;
}

/* Prevent overflow in all containers */
.featured-full-content * {
    max-width: 100%;
    box-sizing: border-box;
}

/* Specific handling for iframes and videos */
.featured-full-content iframe,
.featured-full-content video,
.featured-full-content embed,
.featured-full-content object {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
}

.featured-tags {
    margin-bottom: 30px;
}

.featured-tags .tag {
    background: #f3e0ab;
    color: #333;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 5px 5px 0;
    display: inline-block;
    border: 2px solid #000000;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    background: #f3e0ab;
    color: #000000;
    padding: 15px 30px;
    border: 2px solid #000000;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.featured-read-more:hover {
    background: #e6d19a;
    border-color: #333333;
    transform: translateY(-2px);
}

/* Sidebar Styles */
.blog-sidebar {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #009d9a;
}

.other-blogs {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 10px;
}

.other-blogs::-webkit-scrollbar {
    width: 6px;
}

.other-blogs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.other-blogs::-webkit-scrollbar-thumb {
    background: #009d9a;
    border-radius: 3px;
}

.other-blogs::-webkit-scrollbar-thumb:hover {
    background: #007a78;
}

/* Custom Scrollbar for Featured Blog Container */
.featured-blog::-webkit-scrollbar {
    width: 6px;
}

.featured-blog::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.featured-blog::-webkit-scrollbar-thumb {
    background: #009d9a;
    border-radius: 3px;
}

.featured-blog::-webkit-scrollbar-thumb:hover {
    background: #007a78;
}

.other-blog-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    cursor: pointer;
}

.other-blog-item:last-child {
    margin-bottom: 0;
}

.other-blog-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #009d9a;
}

.other-blog-image {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
}

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

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

.other-blog-content {
    flex: 1;
}

.other-blog-meta {
    color: #999;
    font-size: 11px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.other-blog-meta span {
    color: #009d9a;
    font-weight: 600;
}

.other-blog-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.other-blog-excerpt {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 10px;
}

.other-blog-read-more {
    color: #009d9a;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.other-blog-read-more:hover {
    color: #007a78;
    text-decoration: none;
}

.other-blog-link {
    text-decoration: none;
    color: inherit;
}

.other-blog-link:hover {
    text-decoration: none;
    color: inherit;
}

/* No Blogs State */
.no-blogs {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.no-blogs-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #009d9a, #007a78);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.no-blogs-icon i {
    font-size: 2rem;
    color: white;
}

.no-blogs h3 {
    color: #333;
    font-weight: 700;
    margin-bottom: 10px;
}

.no-blogs p {
    color: #666;
    font-size: 16px;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .blog-sidebar {
        position: static;
    }

    .featured-blog {
        max-height: none;
        overflow-y: visible;
    }

    .other-blogs {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .blog-container {
        padding: 80px 10px 30px;
    }

    .blog-layout {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .featured-blog {
        max-height: none;
        overflow-y: visible;
    }

    .featured-image-container {
        height: 250px;
    }

    .featured-content {
        padding: 25px;
    }

    .featured-title {
        font-size: 24px;
    }

    .featured-excerpt {
        font-size: 14px;
    }

    .featured-full-content {
        font-size: 15px;
    }

    .featured-full-content h1 {
        font-size: 24px;
    }

    .featured-full-content h2 {
        font-size: 22px;
    }

    .featured-full-content h3 {
        font-size: 20px;
    }

    .featured-full-content h4 {
        font-size: 18px;
    }

    .featured-full-content h5 {
        font-size: 16px;
    }

    .featured-full-content h6 {
        font-size: 15px;
    }

    .featured-full-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        margin: 15px 0;
    }

    .featured-full-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .featured-content {
        overflow-x: hidden;
    }

    .blog-sidebar {
        padding: 20px;
        position: static;
    }

    .sidebar-title {
        font-size: 20px;
    }

    .other-blogs {
        max-height: 400px;
    }

    .other-blog-item {
        padding: 12px;
    }

    .other-blog-image {
        height: 100px;
    }

    .other-blog-title {
        font-size: 13px;
    }

    .other-blog-excerpt {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .blog-container {
        padding: 70px 10px 20px;
    }

    .featured-blog {
        border-radius: 10px;
    }

    .featured-image-container {
        height: 200px;
    }

    .featured-content {
        padding: 20px;
    }

    .featured-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .featured-meta {
        font-size: 12px;
        gap: 15px;
        margin-bottom: 15px;
        flex-wrap: wrap;
    }

    .featured-full-content {
        font-size: 14px;
        line-height: 1.6;
    }

    .featured-full-content h1 {
        font-size: 22px;
    }

    .featured-full-content h2 {
        font-size: 20px;
    }

    .featured-full-content h3 {
        font-size: 18px;
    }

    .featured-full-content h4 {
        font-size: 16px;
    }

    .featured-full-content h5 {
        font-size: 15px;
    }

    .featured-full-content h6 {
        font-size: 14px;
    }

    .featured-full-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        margin: 12px 0;
    }

    .featured-full-content * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .featured-content {
        overflow-x: hidden;
    }

    .featured-full-content p {
        margin-bottom: 12px;
    }

    .featured-full-content ul,
    .featured-full-content ol {
        padding-left: 20px;
    }

    .featured-tags {
        margin-bottom: 20px;
    }

    .featured-tags .tag {
        font-size: 11px;
        padding: 4px 10px;
        margin: 0 3px 5px 0;
    }

    .blog-sidebar {
        padding: 15px;
        border-radius: 10px;
    }

    .sidebar-title {
        font-size: 18px;
        margin-bottom: 20px;
    }

    .other-blogs {
        max-height: 350px;
    }

    .other-blog-item {
        padding: 10px;
        margin-bottom: 12px;
    }

    .other-blog-image {
        height: 80px;
        margin-bottom: 10px;
    }

    .other-blog-title {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .other-blog-excerpt {
        font-size: 10px;
        margin-bottom: 8px;
    }

    .other-blog-meta {
        font-size: 10px;
        gap: 8px;
        margin-bottom: 6px;
    }

    .other-blog-read-more {
        font-size: 10px;
    }
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
}

.loading::after {
    content: 'Loading...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 101;
    color: #009d9a;
    font-weight: 600;
    font-size: 16px;
}

.active-blog {
    border-color: #009d9a !important;
    box-shadow: 0 8px 25px rgba(0, 157, 154, 0.2) !important;
}

/* Open in New Page Button Styles */
.open-new-page-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #009d9a;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid #009d9a;
    margin-top: 15px;
}

.open-new-page-btn:hover {
    background: #007a78;
    border-color: #007a78;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 157, 154, 0.3);
}

.open-new-page-btn i {
    font-size: 12px;
}

.open-new-page-btn-small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #009d9a;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.3s ease;
    border: 1px solid #009d9a;
    margin-bottom: 8px;
}

.open-new-page-btn-small:hover {
    background: #007a78;
    border-color: #007a78;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.open-new-page-btn-small i {
    font-size: 10px;
}

@media (max-width: 768px) {
    .open-new-page-btn {
        padding: 8px 16px;
        font-size: 13px;
    }

    .open-new-page-btn-small {
        padding: 5px 10px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .open-new-page-btn {
        padding: 8px 14px;
        font-size: 12px;
        gap: 6px;
    }

    .open-new-page-btn-small {
        padding: 4px 8px;
        font-size: 9px;
        gap: 4px;
    }
}

@media (max-width: 768px) {
    .blog-social-share {
        padding: 1rem !important;
        text-align: center;
    }

    .social-buttons {
        justify-content: center !important;
        gap: 0.5rem !important;
    }

    .social-share-btn {
        width: 40px !important;
        height: 40px !important;
    }
}

@media (max-width: 480px) {
    .blog-social-share {
        padding: 0.75rem !important;
    }

    .social-buttons {
        margin-top: 10px !important;
        gap: 0.4rem !important;
    }

    .social-share-btn {
        width: 35px !important;
        height: 35px !important;
    }
}