.eg-sidebar {
    border: none;
    font-family: inherit;
}

.eg-sidebar-title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
}

.eg-accordion {
    list-style: none;
    padding: 0;
    margin: 0;
}

.eg-accordion-item {
    margin-bottom: 5px;
}

.eg-accordion-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: none;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 10px;
}

.eg-submenu {
    display: none;
    margin-left: 15px;
    list-style: none;
    padding: 0;
}

.eg-submenu li a {
    display: block;
    padding: 5px 0;
    text-decoration: none;
    color: #555;
}

.eg-submenu li a:hover {
    color: #d5006d;
}

.eg-view-all {
    display: block;
    padding: 8px 10px;
    font-weight: 600;
    text-decoration: none;
}

.archive-page-gallery.main-eg-gallery-page {
    display: flex;
    gap: 70px;
    /* space between sidebar and gallery */
    align-items: flex-start;
    /* top align */
}

.archive-page-gallery.main-eg-gallery-page .archive-sidebar {
    flex: 0 0 25%;
    max-width: 25%;
}

.archive-page-gallery.main-eg-gallery-page .archive-gallery {
    flex: 0 0 75%;
    max-width: 75%;
}

.eg-desc {
    margin-top: 10px;
    font-size: 16px;
    color: #333;
    padding: 0px 21px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eg-card .eg-title {
    font-weight: 600;
    margin: 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tablet (2-column look, smaller gap) */
@media (max-width: 1024px) {
    .archive-page-gallery.main-eg-gallery-page {
        gap: 40px;
    }

    .archive-page-gallery.main-eg-gallery-page .archive-sidebar {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .archive-page-gallery.main-eg-gallery-page .archive-gallery {
        flex: 0 0 70%;
        max-width: 70%;
    }
}

/* Mobile (stacked) */
@media (max-width: 768px) {
    .archive-page-gallery.main-eg-gallery-page {
        flex-direction: column;
        gap: 30px;
    }

    .archive-page-gallery.main-eg-gallery-page .archive-sidebar,
    .archive-page-gallery.main-eg-gallery-page .archive-gallery {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .archive-page-gallery.main-eg-gallery-page .archive-sidebar {
        display: contents;
    }

    .eg-procedures-sidebar {
        width: 100%;
    }
}


.eg-container {
    width: 100%;
    max-width: 1440px;
    /* don’t let it stretch too wide */
    margin: 0 auto;
    /* center */
    padding: 0 15px;
    /* breathing room on small screens */
    box-sizing: border-box;
}

.eg-pair {
    display: flex;
    gap: 20px;
}

/* Tablet */
@media (max-width: 1024px) {
    .eg-container {
        max-width: 100%;
        padding: 0 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .eg-container {
        max-width: 100%;
        padding: 0 15px;
    }
}

.eg-related-posts {
    margin: 30px 0;
}

.eg-related-grid {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.eg-related-item {
    flex: 1 1 calc(33.33% - 20px);
    box-sizing: border-box;
}

.eg-related-item img {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    height: 200px;
    object-fit: cover;
    object-position: top;
}

.eg-related-item h4 {
    margin: 10px 0 0;
    font-size: 16px;
    line-height: 1.3;
    color: #000;
}

@media(max-width:800px) {
    .eg-related-item {
        flex: 1 1 100%;
    }
}

.eg-related-pair
{
    display: flex;
    gap: 20px;    
}