:root {
    --theme-green: #2bba7d;
}

/* ---------- کاور پروفایل ---------- */
.profile-cover {
    height: 260px;
    background: url('https://friendkit.cssninja.io/assets/img/demo/unsplash/17.jpg') center/cover;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
    margin-bottom: 90px
}

.profile-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .35);
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border: 4px solid #fff;
    border-radius: 0px;
    position: absolute;
    left: 50%;
    bottom: -60px;
    transform: translateX(-50%);
    object-fit: cover;
    background: #fff
}

/* ---------- نوار نام و اکشن‌ها ---------- */
.profile-header {
    text-align: center;
    margin-top: -40px;
    margin-bottom: 1.5rem
}

.profile-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .25rem
}

.profile-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    font-size: .9rem;
    margin-top: .75rem
}

.profile-stats span {
    display: block;
    font-weight: 600;
    color: #212529
}

.profile-stats small {
    display: block;
    font-size: .75rem;
    color: #6c757d
}

.social-btns .btn {
    font-size: .85rem
}

/* ---------- تب‌ها (Boxed tabs مثل Friendkit) ---------- */
.profile-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    color: #000000;
    font-weight: bold;
    padding: .75rem 1.5rem 4px 8px;
    border-radius: 0
}

.profile-tabs .nav-link.active {
    color: #4b5df9 !important;
    border-color: #4b5df9;
}

.profile-tabs {
    /* background: white; */
    border-bottom: 1px solid #d3d3d3;
    border-top: 1px solid #d3d3d3;
    margin-bottom: 1.5rem
}

.dark-theme .profile-tabs {
    background: #1e1e1e;
    border: none;
}

/* ---------- کارت آگهی پروژه ---------- */
/* .ad-card{display:flex;gap:.75rem;align-items-center;background:#fff;border-radius:.75rem;
                 padding:.75rem;box-shadow:0 .125rem .5rem rgba(0,0,0,.05);text-decoration:none;color:inherit}
        .ad-thumb{width:96px;height:72px;border-radius:.5rem;object-fit:cover}
        .ad-title{font-size:.85rem;margin-bottom:.25rem;font-weight:600;line-height:1.4}
        .ad-meta{font-size:.75rem;color:#6c757d}
        .ad-price{font-weight:700;color:var(--theme-green);font-size:.9rem} */


@media (min-width: 992px) {
    .seller-info {
        align-items: center !important;
        /* فقط در دسکتاپ */
    }

    .avatar-holder {
        margin-top: -8px;
    }
}

@media (max-width: 992px) {
    .profile-tabs .nav-link {
        padding: 0rem 0.6rem;
        font-size: 13px;
        padding-bottom: 0;
    }
}

@media (max-width: 397px) {
    .user-page-meta .stat-label {
        font-size: 12px;
        /* yes */
    }

    .h6, h6 {
        font-size: 15px;
    }
}

@media (max-width: 367px) {
    .user-page-meta .stat-label {
        font-size: 11px;
    }
}

.profile-img {
    width: 90px;
}

.ghavanin {
    font-size: 15px;
}

.select2-container--default .select2-selection--single {
    height: 50px;
    /* border-radius: 0px; */
    border: 1px solid #dee2e6;
    padding: 10px;
    background: transparent;
}

.select2-selection__rendered {
    font-size: .92rem;
    line-height: 30px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    top: 10px;
}

.select2-container--default .select2-selection--single {
    background-color: #fff;
    border: 1px solid #dee2e6;
    /* border-radius: 0px; */
    height: auto;
}

.dark-theme .profile-tabs .nav-link {

    color: #ffffff;
}

.profile-tabs i {
    margin-left: 4px;
    position: relative;
    top: -2px;
    font-size: 21px !important;
}

/* ── Profile Tabs: horizontal scroll on mobile ── */
@media (max-width: 768px) {
    .profile-tabs {
        display: flex;
        /* اگر UL است، فلکس شود */
        flex-wrap: nowrap;
        /* هر آیتم در یک خط */
        overflow-x: auto;
        /* اسکرول افقی */
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        /* gap: 14px; */
        /* فاصله بین آیتم‌ها (دلخواه) */
        /* padding: 21px 12px; */
        /* فضای داخلی برای لمس راحت‌تر */
        scroll-snap-type: x proximity;
        margin-bottom: 10px;
        justify-content: space-around !important;
        margin-top: 8px;
        /* اسنپ نرم (دلخواه) */
    }

    .profile-tabs .nav-item {
        flex: 0 0 auto;
        /* جلوگیری از جمع‌شدن */
        scroll-snap-align: start;
        /* اسنپ هر آیتم به شروع */
    }

    /* حذف خط جداکننده در موبایل تا مزاحم اسکرول نشود */
    .profile-tabs .nav-item + .nav-item {
        padding-inline-start: 0;
        margin-inline-start: 0;
    }

    .profile-tabs .nav-item + .nav-item::before {
        content: none;
    }

    /* مخفی‌کردن اسکرول‌بار در مرورگرهای رایج (اختیاری) */
    .profile-tabs::-webkit-scrollbar {
        display: none;
    }

    .profile-tabs {
        scrollbar-width: none;
    }

    .about {
        font-size: 15px;
    }

    .mobilesize-text {
        font-weight: 600;
    }

    .seller-info {
        padding-top: 16px !important;
    }

    .mainusername {
        font-size: 16px !important;
        font-weight: 900 !important;
    }

    .top-actions-mobile {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 7px;
    }

    .top-actions-mobile a, .top-actions-mobile button {
        font-size: 14px;
        /* padding: 7px 16px !important; */
        height: 32px;
        justify-content: center;
        align-items: center;
        background: #f1f2f5;
        border: 0;
        font-weight: 600;
    }

    .top-actions-mobile a i, .top-actions-mobile button i {
        position: relative;
        top: 2px;
        font-size: 19px;
        margin-left: 5px;
    }

    .top-actions-mobile .phone {
        rotate: 265deg;
        top: 0px;
        font-size: 18px;
    }

    .top-actions-mobile .follow {
        background: #4b5df9;
        color: white;
    }


}

@media (max-width: 768px) {
    .mobilesize-text {

        font-size: 12px;
    }
}

.verified-badge {
    position: relative;
    top: -2px;

}

/* تغییر رفتار tab-pane از opacity به display */
.tab-pane {
    display: none;
}

.tab-pane.show,
.tab-pane.active {
    display: block;
}

.stories-scroller {
    justify-content: space-evenly;
}

.story-item {


    width: 140px;
    height: 190px;
}

.seller-top-div {
    background: white;
}

body {
    background-color: white;
}

.storiesHighlight-scroller {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 0px 2px 12px;
    scrollbar-width: none;
    justify-content: flex-start;
    padding: 0px 2px 12px;
}

.storiesHighlight-scroller .story-item {
    display: flex;
    flex-direction: column;
    height: auto;
    width: auto;
    background: none;
    box-shadow: none;
    text-align: center;
}

.storiesHighlight-scroller .story-avatar {
    position: relative;
    bottom: auto;
    right: auto;
    width: 80px;
    height: 80px;

    object-fit: cover;
    box-shadow: none;
    border: none;
    border: 3px solid #f1f2f5;
    border-radius: 50%;
    padding: 3px;
}

.storiesHighlight-scroller .highlight-name {
    font-size: 12px;
}

.profile-tabs-text {
    margin-top: -9px;
    font-weight: 300;
}

/* ========== Instagram-like Posts Grid ========== */
.instagram-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    width: 100%;
}

.instagram-post-item {
    position: relative;
    aspect-ratio: 1/1.3;
    overflow: hidden;
    cursor: pointer;
    background: #000;
    border-left: 1px solid white;
    border-top: 1px solid white;
}

.instagram-post-item .post-thumbnail {
    width: 100%;
    height: 100%;
}

.instagram-post-item .post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-icon {
    position: absolute;
    top: 8px;
    left: 8px;
    color: white;
    font-size: 24px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* ========== Instagram-like Full Screen Post List ========== */
.instagram-post-list-view {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* Desktop: Centered container with dark background */
@media (min-width: 769px) {
    .instagram-post-list-view {
        background: rgba(0, 0, 0, 0.75);
        align-items: center;
        justify-content: flex-start;
        padding: 40px 20px;
    }

    .instagram-post-list-wrapper {
        max-width: 600px;
        width: 100%;
        background: #000;
        margin: 0 auto;
    }

    .instagram-post-list-header {
        width: 100%;
        background: #000;
    }

    .instagram-post-list-content {
        width: 100%;
        background: #000;
    }
}

/* Mobile: Full screen */
@media (max-width: 768px) {
    .instagram-post-list-view {
        background: #000;
        padding: 0;
    }

    .instagram-post-list-wrapper {
        width: 100%;
    }

    .instagram-post-list-content {
        width: 100%;
    }

    .instagram-post-list-header {
        width: 100%;
    }
}

.instagram-post-list-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .instagram-post-list-wrapper {
        max-width: 600px;
        background: #000;
    }
}

.instagram-post-list-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #eff0f1;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dark-theme .instagram-post-list-header {

    border-bottom: 1px solid #262626;
}

@media (min-width: 769px) {
    .instagram-post-list-header {
        position: sticky;
        top: 0;
        border-radius: 0;
    }
}

.instagram-post-list-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

@media (min-width: 769px) {
    .instagram-post-list-content {
        overflow-y: auto;
    }
}

.instagram-post-full {
    background: #ffffff;
    color: #000000;
    margin-bottom: 0;
}

.dark-theme.instagram-post-full {
    background: #000;
    color: #fff;

}

@media (min-width: 769px) {
    .instagram-post-full {
        border-bottom: 1px solid #262626;
    }

    .instagram-post-full:last-child {
        border-bottom: none;
    }
}

.instagram-post-full .post-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
}

.instagram-post-full .post-header img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.instagram-post-full .post-header .post-user-info {
    flex: 1;
}

.instagram-post-full .post-header .post-username {
    font-weight: 600;
    font-size: 14px;
}

.instagram-post-full .post-header .post-audio {
    font-size: 12px;
    color: #a8a8a8;
    margin-top: 2px;
}

.instagram-post-full .post-media-container {
    position: relative;
    width: 100%;
    background: #ffffff
}

.dark-theme .instagram-post-full .post-media-container {

    background: #000;
}

.instagram-post-full .post-media-container .swiper {
    width: 100%;
}

.instagram-post-full .post-media-container img,
.instagram-post-full .post-media-container video {
    width: 100%;
    display: block;
}

.instagram-post-full .post-actions {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 0px;
    margin-top: -16px;
    position: relative;
    z-index: 99999;
}

.instagram-post-full .post-actions i::before {
    font-weight: 600 !important;
}

.instagram-post-full .post-actions button {
    background: none;
    border: none;
    color: #000000;
    font-size: 24px;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}

.dark-theme .instagram-post-full .post-actions button {

    color: #fff;

}

.instagram-post-full .post-actions .post-like-btn.liked {
    color: #ed4956;
}

.instagram-post-full .post-likes, .instagram-post-full .post-comments-count, .instagram-post-full .post-share-count {
    padding: 0 16px 8px;
    font-weight: 600;
    font-size: 14px;
    display: contents;
}

.instagram-post-full .post-caption-section {
    padding: 0 16px 12px;
}

.instagram-post-full .post-caption {
    font-size: 14px;
    line-height: 1.5;
}

.instagram-post-full .post-caption .post-username {
    font-weight: 600;
    margin-left: 4px;
}

.instagram-post-full .post-caption-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.instagram-post-full .post-caption-expand {
    color: #a8a8a8;
    cursor: pointer;
    font-size: 14px;
    margin-top: 4px;
}

.instagram-post-full .post-hashtags {
    color: #00376b;
    margin-top: 4px;
}

.instagram-post-full .post-comments-preview {
    padding: 0 16px 8px;
}

.instagram-post-full .post-comments-preview .comment-item {
    font-size: 14px;
    margin-bottom: 4px;
}

.instagram-post-full .post-comments-preview .comment-username {
    font-weight: 600;
    margin-left: 4px;
}

.instagram-post-full .post-date {
    padding: 0 16px 16px;
    font-size: 10px;
    color: #a8a8a8;
    text-transform: uppercase;
}

/* ========== Comments Modal ========== */
.instagram-comments-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: #ffffff;
    z-index: 10000;
    display: flex;
    flex-direction: column;
}

.dark-theme .instagram-comments-modal {
    background: #000;
}

.comments-modal-header {
    padding: 12px 0;
    border-bottom: 1px solid #dedfe3;
    position: relative;
}

.dark-theme .comments-modal-header {
    border-bottom: 1px solid #262626;
}

.comments-modal-drag-handle {
    width: 36px;
    height: 4px;
    background: #8e8e8e;
    border-radius: 2px;
    margin: 8px auto;
}

.comments-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #262626;
    overflow-x: auto;
}

.comments-filter-bar .comments-sort-btn {
    background: transparent;
    border: 1px solid #262626;
    color: #fff;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
}

.comments-filter-buttons {
    display: flex;
    gap: 8px;
}

.comments-filter-bar .filter-btn {
    background: transparent;
    border: none;
    color: #a8a8a8;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.comments-filter-bar .filter-btn.active {
    background: #262626;
    color: #fff;
}

.comments-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
}

.comment-item-full {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-item-full img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comment-item-full .comment-content {
    flex: 1;
}

.comment-item-full .comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-item-full .comment-username {
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.comment-item-full .comment-time {
    font-size: 12px;
    color: #a8a8a8;
}

.comment-item-full .comment-author-badge {
    font-size: 12px;
    color: #ed4956;
}

.comment-item-full .comment-text {
    font-size: 14px;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 8px;
}

.comment-item-full .comment-actions {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: #a8a8a8;
}

.comment-item-full .comment-actions button {
    background: none;
    border: none;
    color: #a8a8a8;
    padding: 0;
    cursor: pointer;
}

.comment-item-full .comment-like {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.comment-item-full .comment-like.liked {
    color: #ed4956;
}

.comment-reply {
    margin-right: 44px;
    margin-top: 12px;
}

/* Style existing comment structure in modal */
.comments-list .comment-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    color: #fff;
}

.comments-list .comment-item img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.comments-list .comment-item .flex-grow-1 {
    flex: 1;
}

.comments-list .comment-item .fw-semibold a {
    color: black !important;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}

.dark-theme .comments-list .comment-item .fw-semibold a {
    color: #fff !important;
}

.comments-list .comment-item .comment-time {
    color: #a8a8a8;
    font-size: 12px;
}

.comments-list .comment-item .comment-body {
    color: black;
    font-size: 14px;
    line-height: 1.4;
    margin-top: 4px;
    margin-bottom: 8px;
}

.dark-theme .comments-list .comment-item .comment-body {
    color: #fff;
}

.comments-list .comment-item .reply-btn {
    color: #a8a8a8 !important;
    font-size: 12px;
    padding: 0;
    background: none;
    border: none;
}

.comments-list .comment-item .showComments-btn {
    color: #a8a8a8 !important;
    font-size: 12px;
    padding: 0;
    background: none;
    border: none;
    width: 100%;
    text-align: right;
}

.comments-list .comment-thread {
    margin-right: 44px;
    margin-top: 12px;

}

.comments-list .comment-thread .comment-item {
    margin-bottom: 12px;
}

.comments-input-section {
    padding: 12px 16px;
    border-top: 1px solid #dedfe3;
    background: white;
}

.dark-theme .comments-input-section {
    border-top: 1px solid #262626;
    background: #000;
}

.comments-emoji-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    overflow-x: auto;
}

.comments-emoji-bar .emoji-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 4px;
    cursor: pointer;
}

.comments-input-section .comments-input {
    background: #ffffff;
    border: none;
    color: #000000;
    border-radius: 22px;
    padding: 8px 16px;
    border: 1px solid #dedfe3;
}

.dark-theme .comments-input-section .comments-input {
    background: #262626;
    color: #fff;
}

.comments-input-section .comments-input::placeholder {
    color: #a8a8a8;
}

.comments-send-btn {
    width: 54px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 23px;
    border-radius: 20px;
    background: #445eff;
}

@media (max-width: 768px) {
    .instagram-posts-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

#closeCommentsModal {
    color: black;
}

.dark-theme #closeCommentsModal {
    color: white;
}

.custom-telephone::before {
    font-weight: 600 !important;
    font-size: 14px;
}

.post-actions .left-group {
    align-items: center;
    gap: 27px;

}

.custom-table-td {
    font-size: 13px !important;
}

.price-table thead th {
    padding-top: 0;
}

.price-table thead th {
    font-size: 13px !important;
}

.price-table tbody td {
    font-weight: 300 !important;
    font-size: 13px !important;
    padding: 4px 12px !important;
}

.price-table tbody tr {

    box-shadow: 0 1px 0px rgb(0 0 0 / 12%) !important;
}
