/* Sidebar Styles */
.gamiato-sidebar-section {
    padding: 20px 0 0;
}

/* Top Posts Widget Styles */
.gamiato-top-posts-widget {
    background: #f7f7f7;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px; /* افزایش فاصله از پایین */
}

body.dark-mode .gamiato-top-posts-widget {
    background: #2a2a2a;
}

.gamiato-top-posts-title {
    font-size: 20px;
    font-weight: normal;
    color: #333333;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gamiato-top-posts-title .gamiato-top-posts-icon-wrapper {
    display: inline-flex;
    align-items: center;
}

.gamiato-top-posts-title .gamiato-top-posts-icon {
    width: 24px;
    height: 24px;
}

body.dark-mode .gamiato-top-posts-title {
    color: #ffffff;
}

body.dark-mode .gamiato-top-posts-title .gamiato-top-posts-icon {
    filter: brightness(0) invert(1);
}

.gamiato-top-posts-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.gamiato-top-posts-item a {
    display: flex;
    gap: 10px;
    text-decoration: none;
    color: #333333;
}

body.dark-mode .gamiato-top-posts-item a {
    color: #ffffff;
}

.gamiato-top-posts-image-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.gamiato-top-posts-rank {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #e20a0b;
    font-size: 16px;
    font-weight: 700;
    background: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.gamiato-top-posts-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.gamiato-top-posts-details {
    flex: 1;
}

.gamiato-top-posts-item h4 {
    font-size: 14px;
    font-weight: 500;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gamiato-top-posts-item h4:hover {
    color: #e20a0b;
}

.gamiato-top-posts-views {
    font-size: 14px;
    color: #666666;
    display: flex;
    align-items: center;
    gap: 4px;
}

.gamiato-top-posts-views .gamiato-top-posts-icon {
    width: 16px;
    height: 16px;
}

body.dark-mode .gamiato-top-posts-views {
    color: #cccccc;
}

body.dark-mode .gamiato-top-posts-views .gamiato-top-posts-icon {
    filter: brightness(0) invert(1);
}

/* Sidebar Ads Styles */
.gamiato-sidebar-ads-section {
    margin: 20px 0 20px;
}

.gamiato-sidebar-ads-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.gamiato-sidebar-ads-row {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.gamiato-sidebar-ad-banner {
    flex: 0 0 calc(50% - 4px);
}

.gamiato-sidebar-ad-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    aspect-ratio: 1 / 1;
}

.gamiato-sidebar-ad-placeholder {
    flex: 0 0 calc(50% - 4px);
    visibility: hidden;
}

/* Sidebar Text Ads Styles */
.gamiato-sidebar-text-ads-section {
    margin: 0 0 20px;
}

.gamiato-sidebar-text-ads-title {
    font-size: 20px;
    font-weight: normal;
    color: #333333;
    margin: 0 0 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gamiato-sidebar-text-ads-title .gamiato-sidebar-text-ads-icon-wrapper {
    display: inline-flex;
    align-items: center;
}

.gamiato-sidebar-text-ads-title .gamiato-sidebar-text-ads-icon {
    width: 24px;
    height: 24px;
}

body.dark-mode .gamiato-sidebar-text-ads-title {
    color: #ffffff;
}

body.dark-mode .gamiato-sidebar-text-ads-title .gamiato-sidebar-text-ads-icon {
    filter: brightness(0) invert(1);
}

.gamiato-sidebar-text-ads-list {
    list-style: none;
    margin: 0 0 15px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gamiato-sidebar-text-ads-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #333333;
    font-size: 14px;
}

.gamiato-sidebar-text-ads-item a:hover {
    color: #e20a0b;
}

body.dark-mode .gamiato-sidebar-text-ads-item a {
    color: #ffffff;
}

body.dark-mode .gamiato-sidebar-text-ads-item a:hover {
    color: #e20a0b;
}

.gamiato-sidebar-text-ads-bullet {
    width: 8px;
    height: 8px;
    background-color: #666666;
    border-radius: 50%;
}

body.dark-mode .gamiato-sidebar-text-ads-bullet {
    background-color: #cccccc;
}

.gamiato-sidebar-text-ads-button-container {
    margin-top: 15px;
}

.gamiato-sidebar-text-ads-button {
    display: block;
    width: 100%;
    padding: 10px 0;
    background-color: #e20a0b;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.gamiato-sidebar-text-ads-button:hover {
    background-color: #c3090a;
}

@media (max-width: 768px) {
    .gamiato-sidebar-ads-section {
        margin: 20px 0 20px;
    }

    .gamiato-sidebar-ads-container {
        gap: 8px;
    }

    .gamiato-sidebar-ads-row {
        flex-direction: row;
        gap: 8px;
    }

    .gamiato-sidebar-ad-banner {
        flex: 0 0 calc(50% - 4px);
    }

    .gamiato-sidebar-ad-image {
        width: 100%;
        height: auto;
        border-radius: 8px;
    }

    .gamiato-sidebar-ad-placeholder {
        flex: 0 0 calc(50% - 4px);
        visibility: hidden;
    }
}