/* استایل گرید ۳ ستونه اینستاگرامی */
.asm-social-container {
    direction: rtl;
    max-width: 650px;
    margin: 0 auto;
    padding: 10px;
    font-family: inherit;
}

.asm-instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-top: 15px;
}

.asm-grid-item {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    cursor: pointer;
    background: #f0f2f5;
    border-radius: 4px;
}

.asm-grid-thumb-box {
    width: 100%;
    height: 100%;
    position: relative;
}

.asm-grid-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.asm-grid-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: bold;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.asm-grid-item:hover .asm-grid-overlay {
    opacity: 1;
}

/* استوری‌ها */
.asm-social-stories-wrapper {
    overflow-x: auto;
    padding: 5px 0 12px 0;
    -webkit-overflow-scrolling: touch;
}

.asm-social-stories {
    display: flex;
    gap: 14px;
}

.asm-story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    flex: 0 0 68px;
}

.asm-story-avatar-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
}

.asm-story-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}

.asm-story-title {
    font-size: 11px;
    margin-top: 5px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 68px;
}

/* مودال لایت‌باکس پست */
.asm-post-modal, .asm-story-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asm-modal-backdrop, .asm-story-backdrop {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
}

.asm-modal-wrapper {
    position: relative;
    background: #fff;
    width: 95%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.asm-modal-close, .asm-story-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    font-size: 24px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
}

.asm-modal-media-wrap img {
    width: 100%;
    max-height: 50vh;
    object-fit: contain;
    background: #000;
    display: block;
}

.asm-modal-info-wrap {
    padding: 12px 15px;
}

.asm-modal-author {
    font-weight: bold;
    margin-bottom: 8px;
}

.asm-modal-caption {
    font-size: 13px;
    color: #333;
    line-height: 1.5;
    margin-bottom: 12px;
}

.asm-like-btn {
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
}

.asm-like-btn.liked {
    background: #ffebee;
    border-color: #ffcdd2;
}

.asm-modal-comment-box form {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.asm-modal-comment-box input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
}

.asm-modal-comment-box button {
    background: #0084ff;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
}

/* پاپ‌آپ استوری */
.asm-story-box {
    position: relative;
    width: 90%;
    max-width: 380px;
    height: 80vh;
    max-height: 650px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    z-index: 2;
    display: flex;
    flex-direction: column;
}

.asm-story-progress-bar {
    width: 100%;
    height: 3px;
    background: rgba(255,255,255,0.3);
}

.asm-story-progress-fill {
    height: 100%;
    width: 0%;
    background: #fff;
}

.asm-story-header {
    padding: 10px;
    color: #fff;
    display: flex;
    justify-content: space-between;
}

.asm-story-media-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asm-story-media-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.asm-story-footer {
    padding: 12px;
    text-align: center;
}

.asm-story-link-btn {
    background: #fff;
    color: #000;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
}
