/* ============================================
   اینستامنتور - استایل اصلی
   ============================================ */

/* فونت وزیرمتن */
@import url('vazirmatn.css');

:root {
    --insta-primary: #0095f6;
    --insta-secondary: #262626;
    --insta-bg: #ffffff;
    --insta-border: #dbdbdb;
    --insta-text: #262626;
    --insta-text-secondary: #8e8e8e;
    --insta-like: #ed4956;
    --insta-save: #262626;
    --insta-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/* حالت تاریک */
.dark-mode {
    --insta-bg: #000000;
    --insta-text: #fafafa;
    --insta-border: #262626;
    --insta-text-secondary: #8e8e8e;
}

/* ============================================
   استایل‌های عمومی
   ============================================ */
.insta-mentor-wrapper {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: var(--insta-bg);
    color: var(--insta-text);
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

/* ============================================
   هدر اینستاگرامی
   ============================================ */
.insta-header {
    background: var(--insta-bg);
    border-bottom: 1px solid var(--insta-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.insta-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 935px;
    margin: 0 auto;
    padding: 0 20px;
}

.insta-logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--insta-text);
}

.insta-header-icons {
    display: flex;
    gap: 20px;
    align-items: center;
}

.insta-header-icons a {
    color: var(--insta-text);
    font-size: 22px;
    position: relative;
    text-decoration: none;
}

.insta-notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: var(--insta-like);
    color: #fff;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   پروفایل هدر
   ============================================ */
.insta-profile-header {
    display: flex;
    padding: 30px 20px;
    background: var(--insta-bg);
    border-bottom: 1px solid var(--insta-border);
}

.insta-profile-avatar {
    width: 150px;
    flex-shrink: 0;
    text-align: center;
}

.insta-profile-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--insta-border);
}

.insta-profile-info {
    flex: 1;
    margin-right: 30px;
}

.insta-profile-username {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
}

.insta-profile-stats {
    display: flex;
    gap: 40px;
    margin-bottom: 20px;
}

.insta-stat-item {
    text-align: center;
}

.insta-stat-count {
    font-weight: bold;
    font-size: 18px;
}

.insta-stat-label {
    color: var(--insta-text-secondary);
    font-size: 14px;
}

.insta-profile-bio {
    line-height: 1.6;
}

.insta-profile-bio p {
    margin: 5px 0;
}

.insta-profile-actions {
    margin-top: 20px;
}

.insta-follow-btn {
    background: var(--insta-primary);
    color: #fff;
    border: none;
    padding: 8px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
}

.insta-message-btn {
    background: var(--insta-bg);
    color: var(--insta-text);
    border: 1px solid var(--insta-border);
    padding: 8px 25px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    margin-right: 10px;
}

/* ============================================
   استوری‌ها
   ============================================ */
.insta-stories-wrapper {
    padding: 15px 0;
    background: var(--insta-bg);
    border-bottom: 1px solid var(--insta-border);
    margin-bottom: 20px;
}

.stories-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0 15px;
}

.story-item {
    flex-shrink: 0;
    cursor: pointer;
    margin-left: 15px;
    text-align: center;
}

.story-border {
    border: 2px solid var(--insta-gradient);
    border-radius: 50%;
    padding: 3px;
    transition: transform 0.2s;
}

.story-item:hover .story-border {
    transform: scale(1.05);
}

.story-image {
    border-radius: 50%;
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.story-username {
    display: block;
    font-size: 11px;
    margin-top: 5px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   فید پست‌ها
   ============================================ */
.insta-feed {
    max-width: 600px;
    margin: 0 auto;
}

.insta-post-card {
    background: var(--insta-bg);
    border: 1px solid var(--insta-border);
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.insta-post-header {
    display: flex;
    align-items: center;
    padding: 14px;
}

.insta-post-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-left: 10px;
}

.insta-post-username {
    font-weight: 600;
    font-size: 14px;
}

.insta-post-time {
    color: var(--insta-text-secondary);
    font-size: 12px;
}

.insta-post-media {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
}

.insta-post-video {
    width: 100%;
    max-height: 600px;
}

.insta-post-actions {
    display: flex;
    justify-content: space-between;
    padding: 14px;
}

.insta-post-actions-left {
    display: flex;
    gap: 16px;
}

.insta-post-action-btn {
    background: none;
    border: none;
    color: var(--insta-text);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.2s;
}

.insta-post-action-btn:hover {
    transform: scale(1.1);
}

.insta-post-action-btn.liked {
    color: var(--insta-like);
}

.insta-post-action-btn.saved {
    color: var(--insta-save);
}

.insta-post-likes {
    padding: 0 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.insta-post-caption {
    padding: 0 14px;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.6;
}

.insta-post-caption .username {
    font-weight: 600;
    margin-left: 5px;
}

.insta-post-comments {
    padding: 0 14px 14px;
}

.insta-post-comment-link {
    color: var(--insta-text-secondary);
    text-decoration: none;
    font-size: 14px;
}

/* ============================================
   ریلز
   ============================================ */
.insta-reels-wrapper {
    position: relative;
    max-width: 400px;
    margin: 0 auto;
}

.insta-reel-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.insta-reel-video {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: 12px;
}

.insta-reel-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: #fff;
}

.insta-reel-actions {
    position: absolute;
    right: 10px;
    bottom: 80px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.insta-reel-action-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.insta-reel-action-btn span {
    font-size: 12px;
}

/* ============================================
   هایلایت‌ها
   ============================================ */
.insta-highlights-wrapper {
    padding: 15px 0;
    border-bottom: 1px solid var(--insta-border);
    margin-bottom: 20px;
}

.insta-highlight-item {
    flex-shrink: 0;
    cursor: pointer;
    margin-left: 20px;
    text-align: center;
}

.insta-highlight-image {
    width: 77px;
    height: 77px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--insta-border);
}

/* ============================================
   انیمیشن‌ها
   ============================================ */
@keyframes likeAnimation {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 0; }
}

.insta-like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #fff;
    pointer-events: none;
    animation: likeAnimation 1s ease-out;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* ============================================
   اکسپلور
   ============================================ */
.insta-explore-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
}

.insta-explore-item {
    position: relative;
    padding-bottom: 100%;
    overflow: hidden;
    cursor: pointer;
}

.insta-explore-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.insta-explore-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
}

.insta-explore-item:hover .insta-explore-overlay {
    opacity: 1;
}

/* ============================================
   Infinite Scroll
   ============================================ */
.insta-loading-spinner {
    text-align: center;
    padding: 30px;
}

.insta-loading-spinner .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--insta-border);
    border-top: 4px solid var(--insta-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============================================
   تب‌های اینستاگرامی
   ============================================ */
.insta-tabs {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--insta-border);
    background: var(--insta-bg);
}

.insta-tab-item {
    padding: 15px 0;
    margin: 0 30px;
    cursor: pointer;
    color: var(--insta-text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    border-top: 1px solid transparent;
    transition: all 0.3s;
    margin-top: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.insta-tab-item.active {
    color: var(--insta-text);
    border-top-color: var(--insta-text);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .insta-mentor-wrapper {
        max-width: 100%;
    }
    
    .insta-profile-header {
        flex-direction: column;
        align-items: center;
    }
    
    .insta-profile-avatar {
        margin-bottom: 20px;
    }
    
    .insta-profile-avatar img {
        width: 100px;
        height: 100px;
    }
    
    .insta-profile-info {
        margin-right: 0;
        text-align: center;
    }
    
    .insta-profile-stats {
        justify-content: center;
    }
    
    .insta-reel-item {
        border-radius: 0;
    }
    
    .story-size {
        width: 65px;
    }
    
    .story-image {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {
    .insta-post-card {
        border-radius: 0;
        margin-bottom: 15px;
    }
    
    .insta-post-header {
        padding: 10px;
    }
    
    .insta-post-actions {
        padding: 10px;
    }
    
    .insta-explore-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2px;
    }
}





















/* ═══════════════════════════════════════════════════════════ */
/* INSTA MENTOR - CORE STYLES                                  */
/* ═══════════════════════════════════════════════════════════ */

.insta-mentor-wrapper {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: var(--insta-bg, #ffffff);
    color: var(--insta-text, #262626);
    max-width: 600px;
    margin: 0 auto;
    min-height: 100vh;
}

:root {
    --insta-primary: #0095f6;
    --insta-secondary: #262626;
    --insta-bg: #ffffff;
    --insta-border: #dbdbdb;
    --insta-text: #262626;
    --insta-text-secondary: #8e8e8e;
    --insta-like: #ed4956;
    --insta-gradient: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

/*
 * ─── Animations ──────────────────────────────
 */
@keyframes instaHeartBeat {
    0%   { transform: scale(1); }
    15%  { transform: scale(1.3); }
    30%  { transform: scale(1); }
    45%  { transform: scale(1.15); }
    60%  { transform: scale(1); }
}

@keyframes instaLikePop {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    15%  { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    30%  { transform: translate(-50%, -50%) scale(0.95); }
    45%  { transform: translate(-50%, -50%) scale(1.05); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
}

@keyframes instaFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/*
 * ─── Like Animation Overlay ──────────────────
 */
.insta-like-animation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 80px;
    color: #ffffff;
    pointer-events: none;
    z-index: 10;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
    animation: instaLikePop 0.8s ease-out forwards;
}

/*
 * ─── Post Card ───────────────────────────────
 */
.insta-post-card {
    background: #ffffff;
    border: 1px solid #dbdbdb;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.insta-post-card:hover {
    z-index: 2;
}

/*
 * ─── Post Header ─────────────────────────────
 */
.insta-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}

.insta-post-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.insta-post-avatar-wrapper {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.insta-post-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #dbdbdb;
}

.insta-post-header-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.insta-post-username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.insta-verified-badge {
    color: #0095f6;
    font-size: 14px;
    line-height: 1;
}

.insta-post-location {
    font-size: 11px;
    color: #8e8e8e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.insta-post-time {
    font-size: 11px;
    color: #8e8e8e;
    white-space: nowrap;
    flex-shrink: 0;
    margin-right: 8px;
}

/*
 * ─── Post Media ──────────────────────────────
 */
.insta-post-media-wrapper {
    position: relative;
    overflow: hidden;
    background: #fafafa;
    line-height: 0;
}

.insta-post-media {
    width: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.insta-post-video {
    width: 100%;
    display: block;
    object-fit: cover;
    background: #000000;
}

.insta-media-type-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    color: #ffffff;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    backdrop-filter: blur(4px);
    z-index: 3;
}

/*
 * ─── Post Content ────────────────────────────
 */
.insta-post-card-content {
    padding: 10px 14px;
}

.insta-post-caption {
    font-size: 14px;
    line-height: 1.7;
    color: #262626;
    margin-bottom: 6px;
    word-break: break-word;
}

.insta-post-hashtags {
    margin-top: 6px;
    margin-bottom: 4px;
    line-height: 1.8;
}

.insta-hashtag {
    color: #00376b;
    font-size: 13px;
    font-weight: 500;
    display: inline;
}

/*
 * ─── Post Actions ────────────────────────────
 */
.insta-post-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 14px;
}

.insta-post-actions-left {
    display: flex;
    gap: 14px;
}

.insta-post-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    font-size: 24px;
    color: #262626;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.insta-post-action-btn:hover {
    color: #8e8e8e;
    transform: scale(1.08);
}

.insta-post-action-btn.liked {
    color: #ed4956;
    animation: instaHeartBeat 0.3s ease;
}

.insta-post-action-btn.saved {
    color: #262626;
}

/*
 * ─── Post Footer (Likes & Comments) ──────────
 */
.insta-post-likes-wrap {
    padding: 0 14px 14px;
}

.insta-post-likes {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 6px;
}

.insta-post-comments-link {
    display: inline-block;
    font-size: 13px;
    color: #8e8e8e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.insta-post-comments-link:hover {
    color: #262626;
}

/*
 * ─── Swiper Overrides ────────────────────────
 */
.insta-swiper-pagination .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    opacity: 1;
    transition: all 0.3s ease;
}

.insta-swiper-pagination .swiper-pagination-bullet-active {
    background: #0095f6;
    width: 18px;
    border-radius: 3px;
}

.insta-swiper-nav {
    color: #ffffff !important;
    width: 28px;
    height: 28px;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 50%;
}

.insta-swiper-nav::after {
    font-size: 10px !important;
}

/*
 * ─── Load More Button ────────────────────────
 */
.insta-load-more-wrapper {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.insta-load-more-btn {
    display: inline-block;
    background-color: #0095f6;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    padding: 12px 35px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 149, 246, 0.3);
}

.insta-load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 149, 246, 0.4);
}

.insta-load-more-btn:active {
    transform: translateY(0);
}

/*
 * ─── Empty State ─────────────────────────────
 */
.insta-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.insta-empty-icon {
    font-size: 48px;
    color: #cccccc;
    margin-bottom: 20px;
    animation: instaFloat 3s ease-in-out infinite;
}

.insta-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.insta-empty-state p {
    font-size: 14px;
    color: #8e8e8e;
}

/*
 * ─── Hidden Posts Utility ────────────────────
 */
.insta-hidden-post {
    display: none;
}

/*
 * ─── Responsive ──────────────────────────────
 */
@media (max-width: 1024px) {
    .insta-post-username {
        font-size: 13px;
    }
    .insta-post-caption {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .insta-mentor-wrapper {
        max-width: 100%;
    }

    .insta-post-header {
        padding: 10px 12px;
    }

    .insta-post-user-avatar {
        width: 36px;
        height: 36px;
    }

    .insta-post-avatar-wrapper {
        width: 36px;
        height: 36px;
    }

    .insta-post-actions {
        padding: 6px 12px;
    }

    .insta-post-actions-left {
        gap: 12px;
    }

    .insta-post-action-btn {
        font-size: 22px;
    }

    .insta-post-likes-wrap {
        padding: 0 12px 12px;
    }

    .insta-post-card-content {
        padding: 8px 12px;
    }

    .insta-load-more-btn {
        padding: 10px 28px;
        font-size: 13px;
    }
}

/*
 * ─── Dark Mode ───────────────────────────────
 */
.dark-mode .insta-post-card {
    background: #000000;
    border-color: #262626;
}

.dark-mode .insta-post-header {
    background: #000000;
}

.dark-mode .insta-post-username {
    color: #fafafa;
}

.dark-mode .insta-post-location,
.dark-mode .insta-post-time {
    color: #a8a8a8;
}

.dark-mode .insta-post-media-wrapper {
    background: #111111;
}

.dark-mode .insta-post-caption {
    color: #fafafa;
}

.dark-mode .insta-hashtag {
    color: #e0f1ff;
}

.dark-mode .insta-post-action-btn {
    color: #fafafa;
}

.dark-mode .insta-post-action-btn:hover {
    color: #a8a8a8;
}

.dark-mode .insta-post-likes {
    color: #fafafa;
}

.dark-mode .insta-post-comments-link {
    color: #a8a8a8;
}

.dark-mode .insta-post-comments-link:hover {
    color: #fafafa;
}

.dark-mode .insta-swiper-nav {
    background: rgba(255, 255, 255, 0.25);
}

.dark-mode .insta-empty-icon {
    color: #444444;
}

.dark-mode .insta-empty-state h3 {
    color: #fafafa;
}

.dark-mode .insta-empty-state p {
    color: #a8a8a8;
}