/* Student Portfolios Page Styles - Elite Dark & Ambient Frame Edition */

.blog-main-container {
    direction: rtl;
    text-align: right;
    background-color: var(--bg-light, #f8fafc);
    padding: 30px 0 80px 0;
    min-height: 100vh;
}

.blog-top-meta {
    margin-bottom: 30px;
    animation: fadeInDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.blog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    margin-bottom: 15px;
    flex-wrap: wrap;
    color: #475569;
}

.blog-breadcrumb a {
    color: #475569 !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-breadcrumb a:hover {
    color: var(--accent-color, #d9386c) !important;
}

.blog-breadcrumb .divider {
    font-size: 0.65rem;
    color: #94a3b8;
}

.blog-breadcrumb .active {
    color: var(--primary-color, #0d121f) !important;
    font-weight: 700;
}

.blog-title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid rgba(15, 23, 42, 0.08);
    padding-bottom: 15px;
    flex-wrap: wrap;
    gap: 15px;
}

.minimal-title {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    font-weight: 900;
    color: var(--primary-color, #0d121f) !important;
    margin: 0;
    position: relative;
}

.minimal-title::after {
    content: '';
    position: absolute;
    bottom: -17px;
    right: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-color, #d9386c);
    border-radius: 2px;
}

.posts-count {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--accent-color, #d9386c);
    background-color: rgba(217, 56, 108, 0.08);
    border: 1px solid rgba(217, 56, 108, 0.2);
    padding: 6px 16px;
    border-radius: 50px;
    white-space: nowrap;
}

/* پنل فیلتر کلاژ تیره */
.modern-control-deck {
    background-color: var(--secondary-color, #1a1f30);
    border-radius: 20px;
    padding: 20px 22px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(217, 56, 108, 0.2);
    margin-bottom: 45px;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: 0.1s;
}

.inline-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.filter-field {
    position: relative;
    display: flex;
    align-items: center;
}

.filter-field.search-field {
    flex: 2;
    min-width: 280px;
}

.filter-field.select-field {
    flex: 1;
    min-width: 220px;
}

.filter-field.button-field {
    flex: 0 0 auto;
    min-width: 130px;
}

.field-icon-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-main-icon,
.select-main-icon {
    position: absolute;
    right: 16px;
    color: var(--accent-color, #d9386c);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.custom-chevron {
    position: absolute;
    left: 16px;
    color: var(--accent-color, #d9386c);
    font-size: 0.8rem;
    pointer-events: none;
}

.clear-search-btn {
    position: absolute;
    left: 15px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    color: #ef4444;
}

.deck-input,
.deck-select {
    width: 100%;
    padding: 13px 42px 13px 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #ffffff;
    background-color: var(--primary-color, #0d121f);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
}

.deck-select {
    padding-left: 36px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.deck-select option {
    background-color: var(--primary-color, #0d121f);
    color: #ffffff;
}

.deck-input::placeholder {
    color: #cbd5e1;
    opacity: 0.6;
}

.deck-input:focus,
.deck-select:focus {
    background-color: rgba(15, 23, 42, 0.95);
    border-color: var(--accent-color, #d9386c);
    box-shadow: 0 0 0 4px rgba(217, 56, 108, 0.15);
}

.deck-submit-btn {
    width: 100%;
    height: 48px;
    background-color: var(--accent-color, #d9386c);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(217, 56, 108, 0.3);
}

.deck-submit-btn:hover {
    background-color: var(--accent-hover, #be2552);
    box-shadow: 0 6px 18px rgba(217, 56, 108, 0.45);
    transform: translateY(-2px);
}

/* گرید کارت‌های نمونه‌کار */
.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

/* کارت لوکس اثر */
.magazine-card-item {
    background: linear-gradient(135deg, var(--secondary-color, #1a1f30) 0%, var(--primary-color, #0d121f) 100%);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.12);
    position: relative;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: cardAppear 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.magazine-card-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        transparent 35%,
        rgba(255, 255, 255, 0.03) 45%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.03) 55%,
        transparent 65%
    );
    background-size: 200% 200%;
    background-position: 200% 0;
    transition: background-position 0.8s ease;
    pointer-events: none;
    z-index: 4;
}

.magazine-card-item:hover {
    transform: translateY(-8px);
    border-color: rgba(217, 56, 108, 0.4);
    box-shadow: 
        0 20px 45px rgba(15, 23, 42, 0.22),
        0 0 35px rgba(217, 56, 108, 0.15);
}

.magazine-card-item:hover::before {
    background-position: -200% 0;
}

/* ================= قاب تصویر سینمایی بلورین (عدم برش زشت عکس اثر در کارت‌ها) ================= */
.card-banner-wrapper {
    position: relative;
    margin: 14px 14px 0 14px;
    border-radius: 18px;
    height: 230px; /* ارتفاع دقیق و ثابت قاب کارت */
    overflow: hidden;
    background-color: #050811;
    width: calc(100% - 28px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-sizing: border-box;
}

.card-banner-wrapper a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: relative;
}

/* عکس پس‌زمینه مات جهت پر کردن حواشی خالی */
.card-img-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(25px) brightness(0.35);
    transform: scale(1.25);
    pointer-events: none;
    z-index: 1;
}

/* عکس اصلی اثر - ۱۰۰٪ کامل بدون برش و زوم */
.card-img-main {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain; /* ضمانت نمایش کامل نقاشی/طرح */
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: block;
    margin: auto;
    border-radius: 8px;
}

.magazine-card-item:hover .card-img-main {
    transform: scale(1.06);
}

/* نشان شیشه‌ای دسته‌بندی */
.card-badge-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(13, 18, 31, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid rgba(217, 56, 108, 0.3);
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.card-badge-category i {
    font-size: 0.7rem;
    color: var(--accent-color, #d9386c);
}

/* کادر متن کارت */
.card-details-box {
    padding: 24px 22px 22px 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    background-color: transparent !important;
}

.card-meta-top {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.card-date-info,
.card-read-time {
    font-size: 0.78rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.card-date-info i,
.card-read-time i {
    font-size: 0.85rem;
    color: var(--accent-color, #d9386c);
}

.card-headline {
    font-size: 1.2rem;
    font-weight: 850;
    line-height: 1.5;
    margin: 0 0 10px 0;
}

.card-headline a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.magazine-card-item:hover .card-headline a {
    color: var(--accent-color, #d9386c) !important;
}

.card-excerpt {
    color: #cbd5e1 !important;
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0 0 20px 0;
}

/* دکمه انتقال به جزئیات اثر */
.card-action-bar {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-read-story {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition, all 0.3s ease);
}

.arrow-icon-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition, all 0.3s ease);
}

.arrow-icon-circle i {
    font-size: 0.75rem;
    color: var(--accent-color, #d9386c);
}

.magazine-card-item:hover .btn-read-story {
    color: var(--accent-color, #d9386c) !important;
}

.magazine-card-item:hover .arrow-icon-circle {
    background-color: var(--accent-color, #d9386c);
    border-color: var(--accent-color, #d9386c);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(217, 56, 108, 0.4);
}

.magazine-card-item:hover .arrow-icon-circle i {
    color: #ffffff;
    transform: translateX(-4px);
}

/* خالی بودن لیست */
.empty-state-wrapper {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, var(--secondary-color, #1a1f30) 0%, var(--primary-color, #0d121f) 100%);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.empty-illustration {
    font-size: 3.2rem;
    color: var(--accent-color, #d9386c);
    margin-bottom: 18px;
    opacity: 0.8;
}

.empty-state-wrapper h2 {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 850;
    margin: 0 0 10px 0;
}

.empty-state-wrapper p {
    color: #cbd5e1;
    font-size: 0.9rem;
    margin: 0 0 25px 0;
}

.btn-reset-filters {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--accent-color, #d9386c);
    color: #ffffff;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(217, 56, 108, 0.3);
}

.btn-reset-filters:hover {
    background-color: var(--accent-hover, #be2552);
    transform: translateY(-2px);
}

/* صفحه‌بندی کپسولی تیره */
.magazine-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 45px 0;
}

.pag-btn,
.pag-num {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background-color: var(--secondary-color, #1a1f30);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.pag-numbers {
    display: flex;
    gap: 8px;
}

.pag-num.active {
    background-color: var(--accent-color, #d9386c);
    color: #ffffff;
    border-color: var(--accent-color, #d9386c);
    box-shadow: 0 4px 18px rgba(217, 56, 108, 0.4);
}

.pag-btn:hover,
.pag-num:hover:not(.active) {
    border-color: var(--accent-color, #d9386c);
    color: var(--accent-color, #d9386c);
    transform: translateY(-2px);
}

/* انیمیشن‌ها */
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes cardAppear {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================================
   استایل اختصاصی پاپ‌آپ و مودال آثار (LTH Modal Component)
   ======================================================== */

.lth-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(13, 18, 31, 0.65) !important;
    backdrop-filter: blur(16px) saturate(140%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2500 !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 20px;
    box-sizing: border-box;
}

.lth-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lth-modal-card {
    background: linear-gradient(180deg, var(--secondary-color, #1a1f30) 0%, var(--primary-color, #0d121f) 100%) !important;
    border-radius: 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    width: 100%;
    max-width: 880px;
    max-height: 90vh;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 
                0 0 40px rgba(217, 56, 108, 0.1) !important;
    position: relative;
    overflow: hidden;
    transform: translateY(30px) scale(0.97);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.lth-modal-overlay.active .lth-modal-card {
    transform: translateY(0) scale(1);
}

.lth-modal-close {
    position: absolute !important;
    top: 18px !important;
    left: 18px !important;
    width: 38px;
    height: 38px;
    background-color: rgba(13, 18, 31, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.lth-modal-close:hover {
    background-color: var(--accent-color, #d9386c) !important;
    border-color: var(--accent-color, #d9386c) !important;
    transform: rotate(90deg);
}

.lth-modal-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
    height: 100%;
    overflow: hidden;
}

.lth-modal-image-box {
    position: relative;
    background-color: #050811;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.modal-img-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(30px) brightness(0.35);
    transform: scale(1.25);
    pointer-events: none;
    z-index: 1;
}

.modal-img-main {
    position: relative;
    z-index: 2;
    max-width: 100%;
    max-height: 420px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
    display: block;
    margin: auto;
}

.lth-modal-content {
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.lth-modal-badge {
    align-self: flex-start;
    color: var(--accent-color, #d9386c);
    background-color: rgba(217, 56, 108, 0.08);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 5px 14px;
    border-radius: 50px;
    margin-bottom: 12px;
    border: 1px solid rgba(217, 56, 108, 0.2);
}

.lth-modal-title {
    font-size: 1.35rem;
    font-weight: 850;
    color: #ffffff;
    line-height: 1.45;
    margin: 0 0 18px 0;
}

.lth-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 16px;
}

.lth-modal-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: #cbd5e1;
}

.meta-item-icon {
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--accent-color, #d9386c);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.meta-item-label {
    opacity: 0.8;
}

.meta-item-value {
    color: #ffffff;
    font-weight: 700;
}

.lth-award-highlight {
    background-color: rgba(217, 56, 108, 0.08);
    border: 1px solid rgba(217, 56, 108, 0.2);
    padding: 8px 14px;
    border-radius: 12px;
    margin-top: 4px;
}

.lth-award-highlight .meta-item-icon {
    background-color: var(--accent-color, #d9386c);
    color: #ffffff;
}

.lth-award-highlight .meta-item-value {
    color: var(--accent-color, #d9386c);
    font-size: 0.85rem;
}

.lth-modal-body h3 {
    font-size: 0.88rem;
    color: var(--text-light, #94a3b8);
    font-weight: 700;
    margin-bottom: 8px;
}

.lth-modal-body #modalDesc {
    font-size: 0.88rem;
    line-height: 1.8;
    color: #cbd5e1;
    text-align: justify;
    margin: 0;
    max-height: 140px;
    overflow-y: auto;
}

.lth-modal-body #modalDesc p {
    margin-bottom: 8px;
    color: #cbd5e1;
}

.lth-modal-body #modalDesc strong,
.lth-modal-body #modalDesc h1,
.lth-modal-body #modalDesc h2,
.lth-modal-body #modalDesc h3 {
    color: #ffffff;
}

/* ================= ریسپانسو تبلت و موبایل ================= */
@media (max-width: 991px) {
    .inline-filter-form {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .filter-field {
        width: 100% !important;
    }
    
    .deck-submit-btn {
        height: 48px;
    }
}

@media (max-width: 768px) {
    .blog-main-container {
        padding: 24px 0 50px 0;
    }
    
    .blog-top-meta {
        margin-bottom: 20px;
    }
    
    .blog-title-group {
        padding-bottom: 12px;
    }
    
    .modern-control-deck {
        margin-bottom: 30px;
        padding: 14px 16px;
    }
    
    .magazine-grid {
        gap: 20px;
        grid-template-columns: 1fr;
    }
    
    /* تثبیت قطعی ارتفاع و عدم برش تصویر در موبایل روی کارت‌ها */
    .card-banner-wrapper {
        height: 220px !important;
        margin: 10px 10px 0 10px !important;
        width: calc(100% - 20px) !important;
        border-radius: 14px !important;
        padding: 6px !important;
    }

    .card-img-main {
        max-height: 208px !important;
        object-fit: contain !important;
    }
    
    .pag-btn, .pag-num {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }

    .lth-modal-overlay {
        padding: 10px;
    }
    
    .lth-modal-card {
        border-radius: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .lth-modal-grid {
        grid-template-columns: 1fr; 
    }
    
    .lth-modal-image-box {
        min-height: 240px;
        max-height: 300px;
        padding: 10px;
    }

    .modal-img-main {
        max-height: 280px;
    }
    
    .lth-modal-content {
        padding: 24px 20px;
    }
    
    .lth-modal-title {
        font-size: 1.25rem;
    }
    
    .lth-modal-close {
        top: 15px !important;
        left: 15px !important;
        background-color: rgba(15, 23, 42, 0.6) !important; 
    }
}

@media (max-width: 360px) {
    .blog-breadcrumb {
        font-size: 0.75rem;
    }
    
    .pag-numbers {
        gap: 4px;
    }
    
    .pag-btn, .pag-num {
        width: 34px;
        height: 34px;
    }
}