/* Simple Webinar Archive CSS for Testing */

:root {
    --primary-blue: #2563eb;
    --secondary-blue: #3b82f6;
    --dark-gray: #1f2937;
    --medium-gray: #6b7280;
}

.webinar-archive-wrapper {
    background: #ffffff;
    min-height: 100vh;
}

/* Hero Section */
.webinar-archive-hero {
    background: linear-gradient(135deg, #2564eb 0%, #3b82f6 100%);
    padding: 120px 0 80px;
    color: #ffffff; /* اطمینان از رنگ سفید */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.webinar-archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.webinar-archive-hero * {
    color: inherit; /* همه عناصر درون hero رنگ سفید داشته باشند */
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: #ffffff; /* رنگ سفید برای عنوان */
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.9),
        3px 3px 6px rgba(0, 0, 0, 0.6),
        0 0 15px rgba(0, 0, 0, 0.4),
        0 0 25px rgba(59, 130, 246, 0.3); /* استایل قوی‌تر به صورت دائمی */
    -webkit-text-stroke: 0.5px rgba(0, 0, 0, 0.3); /* outline نازک برای webkit */
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #ffffff; /* رنگ سفید برای زیرعنوان */
    opacity: 0.95;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.7),
        0 0 8px rgba(0, 0, 0, 0.4); /* سایه ملایم‌تر برای زیرعنوان */
    transition: all 0.3s ease;
    cursor: default;
}

.hero-subtitle:hover {
    opacity: 1;
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(59, 130, 246, 0.2); /* گلو ملایم آبی */
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff; /* رنگ سفید برای آمار */
    text-shadow: 
        1px 1px 3px rgba(0, 0, 0, 0.8),
        0 0 6px rgba(0, 0, 0, 0.5); /* سایه برجسته برای اعداد آمار */
    -webkit-text-stroke: 0.3px rgba(0, 0, 0, 0.2); /* outline نازک برای آمار */
}

.stat-label {
    color: #ffffff; /* رنگ سفید برای برچسب آمار */
    opacity: 0.9;
    text-shadow: 
        1px 1px 2px rgba(0, 0, 0, 0.6),
        0 0 4px rgba(0, 0, 0, 0.3); /* سایه ملایم برای برچسب‌ها */
}

/* Content */
.webinar-archive-content {
    padding: 60px 0;
    background: #f8fafc;
}

/* Reduce gap between sidebar and webinar cards */
.webinar-archive-content .row {
    gap: 20px; /* کمتر کردن فاصله بین sidebar و grid */
}

.webinar-archive-content .col-lg-3 {
    flex: 0 0 auto;
    width: 30%; /* سایدبار بزرگ‌تر - عرض پیش‌فرض بهتر */
}

.webinar-archive-content .col-lg-9 {
    flex: 0 0 auto;
    width: 68%; /* کمتر کردن عرض grid area */
}

/* Filter Sidebar */
.filter-sidebar {
    background: white;
    border-radius: 16px;
    padding: 2.1rem; /* افزایش padding برای فضای بیشتر */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    margin-right: 0; /* حذف margin سمت راست */
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-section h3 {
    color: var(--dark-gray);
    font-size: 1.15rem; /* کمی بزرگ‌تر برای سایدبار بزرگ‌تر */
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.filter-list li {
    margin-bottom: 0.5rem;
}

.filter-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.1rem; /* افزایش padding برای فضای بیشتر */
    color: var(--medium-gray);
    text-decoration: none;
    border-radius: 8px;
    background: #fafbfc;
    transition: all 0.3s ease;
    font-size: 0.95rem; /* کمی بزرگ‌تر */
}

.filter-list a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-blue);
    transform: translateX(-3px);
}

.filter-list a.active {
    background: #e0f2fe;
    border-radius: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transform: translateX(-3px);
}

.filter-list a.active:hover {
    background: #b3e5fc;
    transform: translateX(-5px);
}



.filter-list .count {
    background: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Category count colors in sidebar */
.filter-list .count.bg-pink-100 {
    background: #fce7f3 !important;
    color: #be185d !important;
    border: 1px solid rgba(190, 24, 93, 0.2);
}

.filter-list .count.bg-indigo-100 {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid rgba(67, 56, 202, 0.2);
}

.filter-list .count.bg-yellow-100 {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.filter-list .count.bg-red-100 {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.filter-list .count.bg-teal-100 {
    background: #ccfbf1 !important;
    color: #0f766e !important;
    border: 1px solid rgba(15, 118, 110, 0.2);
}

/* Status-specific count colors in sidebar - darker version 
 * Based on template-webinar-showcase.php but using darker shades for better contrast
 * - بزودی: bg-blue-200 text-blue-700 (darker than landing page)
 * - در حال برگزاری: bg-green-200 text-green-700 (darker than landing page)
 * - پایان یافته: bg-gray-200 text-gray-700 (darker than landing page)
 */
.filter-list .count.status-upcoming {
    background: #bfdbfe !important; /* bg-blue-200 - بزودی (darker) */
    color: #1d4ed8 !important; /* text-blue-700 (darker) */
    border: 1px solid rgba(29, 78, 216, 0.3);
    transition: all 0.3s ease;
}

.filter-list .count.status-live {
    background: #bbf7d0 !important; /* bg-green-200 - در حال برگزاری (darker) */
    color: #15803d !important; /* text-green-700 (darker) */
    border: 1px solid rgba(21, 128, 61, 0.3);
    transition: all 0.3s ease;
}

.filter-list .count.status-completed {
    background: #e5e7eb !important; /* bg-gray-200 - پایان یافته (darker) */
    color: #374151 !important; /* text-gray-700 (darker) */
    border: 1px solid rgba(55, 65, 81, 0.3);
    transition: all 0.3s ease;
}

/* Status count hover effects removed as requested */

/* Search Section Styling */
.search-section {
    margin-bottom: 2rem !important;
}

.search-container {
    margin-top: 1rem;
}

.modern-search-box {
    position: relative;
    display: flex;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.modern-search-box:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.modern-search-box:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.archive-search-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    outline: none;
    font-size: 14px;
    color: #374151;
    background: transparent;
    font-family: inherit;
}

.archive-search-input::placeholder {
    color: #9ca3af;
    font-size: 13px;
}

.archive-search-btn {
    padding: 12px 16px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
}

.archive-search-btn:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e3a8a);
    transform: translateY(-1px);
}

.archive-search-btn:active {
    transform: translateY(0);
}

.archive-search-btn i {
    font-size: 14px;
}

.search-results-info {
    margin-top: 0.75rem;
    padding: 8px 12px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

#archive-search-results {
    font-weight: 500;
}

/* Search highlighting */
.webinar-card.search-match {
    border: 2px solid #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.webinar-card.search-hidden {
    display: none !important;
}

.col-lg-4.search-hidden {
    display: none !important;
}

/* Ensure grid layout is maintained during search */
.webinars-grid .row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.webinars-grid .col-lg-4 {
    display: flex;
    align-items: stretch;
}

.webinars-grid .webinar-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.search-highlight {
    background: rgba(59, 130, 246, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    font-weight: 600;
}

/* Animation classes */
.animate-pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Grid Layout */
.webinars-grid {
    margin-bottom: 3rem;
}

/* Medium Desktop Range: 1 card per row like desktop style */
@media (min-width: 991px) and (max-width: 1015px) {
    /* بهینه‌سازی container برای محدوده میانی */
    .webinar-archive-content .container {
        max-width: 1000px;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* تنظیم sidebar و grid برای layout بهتر */
    .webinar-archive-content .row {
        gap: 18px;
    }
    
    .webinar-archive-content .col-lg-3 {
        width: 40%; /* افزایش بیشتر عرض sidebar برای راحتی استفاده */
    }
    
    .webinar-archive-content .col-lg-9 {
        width: 58%; /* کاهش متناسب عرض grid */
    }
    
         .webinars-grid .row {
         justify-content: center;
         max-width: 100%;
         margin: 0;
         display: flex;
         flex-wrap: wrap;
         gap: 0;
     }
    
    .webinars-grid .col-lg-4 {
        flex: 0 0 100%; /* تکی کردن کارت‌ها در این محدوده */
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* اندازه کارت مثل دسکتاپ اما تکی - حداکثر عرض */
    .webinars-grid .webinar-card {
        width: 100%;
        max-width: 100%; /* استفاده کامل از عرض grid */
        margin: 0;
    }
    
    /* تنظیم sidebar برای این محدوده */
    .filter-sidebar {
        padding: 1.8rem; /* padding متناسب برای عرض 35% */
    }
}

/* Desktop: 2 cards per row with optimal width */
@media (min-width: 1016px) {
    /* بهینه‌سازی container اصلی */
    .webinar-archive-content .container {
        max-width: 1300px; /* افزایش عرض برای سایدبار بزرگ‌تر */
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* تنظیم صحیح عرض sidebar و grid برای desktop */
    .webinar-archive-content .col-lg-3 {
        width: 32%; /* عرض مناسب برای sidebar در desktop */
    }
    
    .webinar-archive-content .col-lg-9 {
        width: 66%; /* عرض متناسب برای grid در desktop */
    }
    
    /* تنظیم padding sidebar برای desktop */
    .filter-sidebar {
        padding: 2rem; /* padding مناسب برای عرض 32% در desktop */
    }
    
    .webinars-grid .row {
        justify-content: flex-start; /* تراز از چپ */
        max-width: 100%; /* استفاده کامل از فضا */
        margin: 0;
        display: flex;
        flex-wrap: wrap;
        gap: 8px 8px; /* کمتر کردن gap برای فضای بیشتر کارت‌ها */
    }
    
    .webinars-grid .col-lg-4 {
        flex: 0 0 calc(50% - 4px); /* کارت‌های بهینه با gap کمتر */
        max-width: calc(50% - 4px);
        margin: 0;
        padding: 0;
    }
    
    /* Optimal card width for 2-column layout */
    .webinars-grid .webinar-card {
        width: 100%;
        max-width: 100%;
    }
}

/* Medium Large Desktop: Standard 2-column layout */
@media (min-width: 1016px) and (max-width: 1299px) {
    .webinar-archive-content .container {
        max-width: 1200px; /* عرض متعادل برای محدوده میانی */
    }
    
    /* تنظیم عرض sidebar برای desktop متوسط */
    .webinar-archive-content .col-lg-3 {
        width: 30%; /* عرض متعادل برای sidebar */
    }
    
    .webinar-archive-content .col-lg-9 {
        width: 68%; /* عرض متناسب برای grid */
    }
    
    /* تنظیم padding sidebar برای desktop متوسط */
    .filter-sidebar {
        padding: 1.9rem; /* padding متناسب برای عرض 30% */
    }
    
    .webinars-grid .row {
        gap: 10px 10px; /* فاصله متعادل */
    }
    
    .webinars-grid .col-lg-4 {
        flex: 0 0 calc(50% - 5px);
        max-width: calc(50% - 5px);
    }
}

/* Large Desktop: Better width for bigger screens - 2 cards */
@media (min-width: 1300px) and (max-width: 1379px) {
    .webinar-archive-content .container {
        max-width: 1500px; /* فضای بیشتر برای سایدبار بزرگ در صفحات بزرگ */
    }
    
    /* تنظیم عرض sidebar برای desktop بزرگ */
    .webinar-archive-content .col-lg-3 {
        width: 28%; /* عرض بهینه برای sidebar در صفحات بزرگ */
    }
    
    .webinar-archive-content .col-lg-9 {
        width: 70%; /* عرض متناسب برای grid در صفحات بزرگ */
    }
    
    /* تنظیم padding sidebar برای desktop بزرگ */
    .filter-sidebar {
        padding: 2.2rem; /* padding بیشتر برای صفحات بزرگ */
    }
    
    .webinars-grid .row {
        gap: 12px 12px; /* فاصله متناسب */
    }
    
    .webinars-grid .col-lg-4 {
        flex: 0 0 calc(50% - 6px); /* کارت‌های متناسب در صفحات بزرگ */
        max-width: calc(50% - 6px);
    }
}

/* Extra Large Desktop: 3 cards per row */
@media (min-width: 1380px) {
    .webinar-archive-content .container {
        max-width: 1800px; /* حداکثر عرض برای صفحات خیلی بزرگ */
    }
    
    /* تنظیم عرض sidebar برای desktop خیلی بزرگ */
    .webinar-archive-content .col-lg-3 {
        width: 25%; /* کاهش عرض sidebar برای فضای بیشتر کارت‌ها */
    }
    
    .webinar-archive-content .col-lg-9 {
        width: 73%; /* افزایش عرض grid برای 3 کارت */
    }
    
    /* تنظیم padding sidebar برای desktop خیلی بزرگ */
    .filter-sidebar {
        padding: 2.4rem; /* padding بیشتر برای سایدبار کوچکتر */
    }
    
    .webinars-grid .row {
        gap: 15px 15px; /* فاصله مناسب برای 3 کارت */
    }
    
    .webinars-grid .col-lg-4 {
        flex: 0 0 calc(33.333% - 10px); /* سه کارت در هر ردیف */
        max-width: calc(33.333% - 10px);
        min-width: 320px; /* حداقل عرض برای خوانایی */
    }
    
    /* تنظیم padding و فونت برای کارت‌های سه‌تایی */
    .webinar-card-content {
        padding: 0.8rem; /* padding کمتر برای کارت‌های کوچکتر */
    }
    
    .webinar-title {
        font-size: 1rem; /* فونت متناسب */
        margin-bottom: 0.7rem;
    }
    
    .webinar-meta {
        margin-bottom: 1rem;
    }
    
    .meta-row {
        margin-bottom: 0.6rem;
        padding: 0.3rem 0.6rem;
    }
    
    .webinar-date,
    .webinar-time,
    .webinar-speaker,
    .webinar-duration {
        font-size: 0.75rem;
    }
    
    .webinar-price {
        font-size: 0.85rem;
    }
    
    .btn-view-webinar {
        padding: 0.7rem 1.3rem;
        font-size: 0.85rem;
        margin-top: 0.6rem;
    }
    
    /* تنظیم badge ها برای کارت‌های سه‌تایی */
    .webinar-category-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
        top: 0.8rem;
        left: 0.8rem;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
        top: 0.8rem;
        right: 0.8rem;
    }
}

/* Cards */
.webinar-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.webinar-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.12); /* shadow کمتر و ملایم‌تر */
}

.webinar-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.webinar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.webinar-card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.webinar-title {
    margin-bottom: 0.8rem;
}

.webinar-title a {
    color: var(--dark-gray);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
}

.webinar-meta {
    margin-bottom: 1.2rem;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin: 0.2rem 0;
    border-radius: 8px;
}

.meta-datetime {
    background: rgba(37, 99, 235, 0.04);
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.meta-details {
    background: rgba(107, 114, 128, 0.04);
    border: 1px solid rgba(107, 114, 128, 0.08);
}

.webinar-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 0.5rem;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.webinar-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.webinar-price i {
    color: #059669;
}

/* Meta items with icons */
.webinar-date,
.webinar-time,
.webinar-duration,
.webinar-speaker {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--medium-gray);
    font-size: 0.8rem;
}

.webinar-date i {
    color: var(--primary-blue);
}

.webinar-time i {
    color: #059669;
}

.webinar-duration i {
    color: #f59e0b;
}

.webinar-speaker i {
    color: var(--primary-blue);
}

.btn-view-webinar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 0.8rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-view-webinar:hover {
    background: linear-gradient(135deg, #3373fd, #2a88fb); /* روشن‌تر کردن background */
    color: white; /* حفظ رنگ سفید متن */
    transform: translateY(-2px); /* افکت ملایم بالا رفتن */
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3); /* سایه ملایم */
}

/* Category badge */
.webinar-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 3;
}

/* Category badge colors - matching functions.php colors */
.webinar-category-badge.bg-pink-100 {
    background: #fce7f3 !important;
    color: #be185d !important;
    border: 1px solid rgba(190, 24, 93, 0.2);
}

.webinar-category-badge.bg-indigo-100 {
    background: #e0e7ff !important;
    color: #4338ca !important;
    border: 1px solid rgba(67, 56, 202, 0.2);
}

.webinar-category-badge.bg-yellow-100 {
    background: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.webinar-category-badge.bg-red-100 {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.webinar-category-badge.bg-teal-100 {
    background: #ccfbf1 !important;
    color: #0f766e !important;
    border: 1px solid rgba(15, 118, 110, 0.2);
}



/* Status badge */
.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    z-index: 2;
}

.status-badge.upcoming {
    background: #2563eb; /* bg-blue-600 - بزودی */
}

.status-badge.live {
    background: #16a34a; /* bg-green-600 - در حال برگزاری */
}

.status-badge.completed {
    background: #4b5563; /* bg-gray-600 - پایان یافته */
}

/* Responsive Design for Mobile and Small Tablet */
@media (max-width: 768px) {
    .webinar-archive-hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        color: #ffffff; /* حفظ رنگ سفید در موبایل */
        text-shadow: 
            1px 1px 3px rgba(0, 0, 0, 0.9),
            3px 3px 5px rgba(0, 0, 0, 0.6),
            0 0 12px rgba(0, 0, 0, 0.4),
            0 0 20px rgba(59, 130, 246, 0.3); /* استایل قوی‌تر برای موبایل */
    }
    
    .hero-subtitle {
        color: #ffffff; /* حفظ رنگ سفید زیرعنوان در موبایل */
        opacity: 0.95;
        text-shadow: 
            1px 1px 2px rgba(0, 0, 0, 0.7),
            0 0 6px rgba(0, 0, 0, 0.4); /* سایه متناسب برای موبایل */
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    
    .stat-number {
        margin-bottom: 0;
        font-size: 1.5rem;
        color: #ffffff; /* حفظ رنگ سفید آمار در موبایل */
        text-shadow: 
            1px 1px 2px rgba(0, 0, 0, 0.8),
            0 0 5px rgba(0, 0, 0, 0.5); /* سایه متناسب برای آمار موبایل */
    }
    
    .stat-label {
        color: #ffffff; /* حفظ رنگ سفید برچسب در موبایل */
        opacity: 0.9;
        text-shadow: 
            1px 1px 1px rgba(0, 0, 0, 0.6),
            0 0 3px rgba(0, 0, 0, 0.3); /* سایه ملایم برای برچسب موبایل */
    }
    
    .filter-sidebar {
        margin-bottom: 1rem;
        padding: 1.5rem;
    }
    
    /* Search responsive styles for mobile */
    .modern-search-box {
        flex-direction: column;
    }
    
    .archive-search-input {
        border-bottom: 1px solid #e5e7eb;
        border-radius: 12px 12px 0 0;
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .archive-search-btn {
        border-radius: 0 0 12px 12px;
        padding: 10px;
        min-width: auto;
    }
    
    .search-results-info {
        font-size: 11px;
        margin-top: 0.5rem;
        padding: 6px 10px;
    }
    
    .webinar-card-content {
        padding: 0.6rem;
    }
    
    .meta-row {
        gap: 0.4rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Responsive category badge adjustments */
    .webinar-category-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        top: 0.75rem;
        left: 0.75rem;
    }
    
    /* Responsive status count adjustments */
    .filter-list .count.status-upcoming,
    .filter-list .count.status-live,
    .filter-list .count.status-completed {
        font-size: 0.75rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Font Awesome Icons Styling */
.fas, .far, .fab, .fa {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-transform: none !important;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.far {
    font-weight: 400 !important;
}

.fab {
    font-weight: 400 !important;
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
}

/* Specific Icon Unicode Fallbacks */
.hero-title i::before { content: "\f03d"; }
.filter-section h3 i.fa-folder::before { content: "\f07b"; }
.filter-section h3 i.fa-filter::before { content: "\f0b0"; }
.filter-section h3 i.fa-search::before { content: "\f002"; }
.filter-section h3 i.fa-sort::before { content: "\f0dc"; }
.filter-section h3 i.fa-th::before { content: "\f00a"; }
.view-toggle i.fa-th::before { content: "\f00a"; }
.view-toggle i.fa-list::before { content: "\f03a"; }
.webinar-date i.fa-calendar-alt::before { content: "\f073"; }
.webinar-time i.fa-clock::before { content: "\f017"; }
.webinar-duration i.fa-hourglass-half::before { content: "\f252"; }
.webinar-speaker i.fa-user-tie::before { content: "\f508"; }
.webinar-price i.fa-tag::before { content: "\f02b"; }
.status-badge i.fa-clock::before { content: "\f017"; }
.status-badge i.fa-circle::before { content: "\f111"; }
.status-badge i.fa-check-circle::before { content: "\f058"; }
.btn-view-webinar i.fa-arrow-left::before { content: "\f060"; }
.archive-search-btn i.fa-search::before { content: "\f002"; }

/* Unicode Emoji Fallbacks */
.hero-title i:not(.fas):not(.fa)::before { content: "🎥"; }
.filter-section h3 i.fa-folder:not(.fas):not(.fa)::before { content: "📁"; }
.filter-section h3 i.fa-filter:not(.fas):not(.fa)::before { content: "⚙️"; }
.filter-section h3 i.fa-search:not(.fas):not(.fa)::before { content: "🔍"; }
.filter-section h3 i.fa-sort:not(.fas):not(.fa)::before { content: "↕️"; }
.filter-section h3 i.fa-th:not(.fas):not(.fa)::before { content: "⊞"; }
.view-toggle i.fa-th:not(.fas):not(.fa)::before { content: "⊞"; }
.view-toggle i.fa-list:not(.fas):not(.fa)::before { content: "☰"; }
.webinar-date i:not(.fas):not(.fa)::before { content: "📅"; }
.webinar-time i:not(.fas):not(.fa)::before { content: "🕒"; }
.webinar-duration i:not(.fas):not(.fa)::before { content: "⏱️"; }
.webinar-speaker i:not(.fas):not(.fa)::before { content: "👨‍💼"; }
.webinar-price i:not(.fas):not(.fa)::before { content: "🏷️"; }
.status-badge i:not(.fas):not(.fa)::before { content: "⏰"; }
.btn-view-webinar i:not(.fas):not(.fa)::before { content: "←"; }
.archive-search-btn i:not(.fas):not(.fa)::before { content: "🔍"; }

/* Icon Fallback Mode */
.icon-fallback-mode i {
    font-family: inherit !important;
    font-style: normal !important;
    font-weight: normal !important;
}

.icon-fallback-mode .hero-title i,
.icon-fallback-mode .filter-section h3 i,
.icon-fallback-mode .webinar-date i,
.icon-fallback-mode .webinar-time i,
.icon-fallback-mode .webinar-duration i,
.icon-fallback-mode .webinar-speaker i,
.icon-fallback-mode .webinar-price i,
.icon-fallback-mode .status-badge i,
.icon-fallback-mode .btn-view-webinar i {
    font-size: 1em;
    line-height: 1;
    vertical-align: middle;
}

/* Essential icon and layout styles */
.webinar-price i {
    color: #059669 !important;
    margin-right: 0.25rem;
}

.meta-row {
    border-radius: 8px;
    padding: 0.5rem 1rem;
    margin: 0.25rem 0;
}

.meta-primary {
    background: rgba(37, 99, 235, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(37, 99, 235, 0.08);
}

.meta-secondary {
    background: rgba(107, 114, 128, 0.04);
    border-radius: 8px;
    border: 1px solid rgba(107, 114, 128, 0.08);
}

/* Specific styles for Tablet single card layout */
@media (min-width: 768px) and (max-width: 991px) {
    .webinar-card {
        width: 100%;
        max-width: 100%; /* استفاده کامل از عرض tablet */
        margin: 0;
    }
    
    .filter-sidebar {
        padding: 1.8rem; /* padding بیشتر برای tablet */
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .webinar-archive-hero {
        padding: 60px 0 40px;
    }
    
    .hero-title {
        font-size: 1.5rem;
        color: #ffffff; /* حفظ رنگ سفید در صفحات خیلی کوچک */
        text-shadow: 
            1px 1px 3px rgba(0, 0, 0, 0.9),
            2px 2px 4px rgba(0, 0, 0, 0.6),
            0 0 10px rgba(0, 0, 0, 0.4),
            0 0 18px rgba(59, 130, 246, 0.3); /* استایل قوی‌تر برای صفحات کوچک */
    }
    
    .hero-subtitle {
        color: #ffffff; /* حفظ رنگ سفید زیرعنوان در صفحات خیلی کوچک */
        opacity: 0.95;
        text-shadow: 
            1px 1px 1px rgba(0, 0, 0, 0.7),
            0 0 4px rgba(0, 0, 0, 0.4); /* سایه ملایم برای صفحات کوچک */
    }
    
    .stat-number {
        font-size: 1.2rem;
        color: #ffffff; /* حفظ رنگ سفید آمار در صفحات خیلی کوچک */
        text-shadow: 
            1px 1px 2px rgba(0, 0, 0, 0.8),
            0 0 4px rgba(0, 0, 0, 0.5); /* سایه متناسب برای آمار صفحات کوچک */
    }
    
    .stat-label {
        color: #ffffff; /* حفظ رنگ سفید برچسب در صفحات خیلی کوچک */
        opacity: 0.9;
        text-shadow: 
            1px 1px 1px rgba(0, 0, 0, 0.6),
            0 0 3px rgba(0, 0, 0, 0.3); /* سایه ملایم برای برچسب صفحات کوچک */
    }
    
    .webinar-card-content {
        padding: 0.5rem;
    }
    
    /* Very small screens category badge adjustments */
    .webinar-category-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    
    /* Very small screens status count adjustments */
    .filter-list .count.status-upcoming,
    .filter-list .count.status-live,
    .filter-list .count.status-completed {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
}

/* Tablet: Single card per row with full width */
@media (min-width: 768px) and (max-width: 991px) {
    .webinar-archive-content .container {
        max-width: 100%; /* عرض کامل برای tablet */
    }
    
    .webinar-archive-content .row {
        gap: 15px; /* کمتر کردن فاصله در tablet */
    }
    
    .webinar-archive-content .col-md-4 {
        width: 40%; /* افزایش عرض sidebar برای جلوگیری از فشردگی */
    }
    
    .webinar-archive-content .col-md-8 {
        width: 58%; /* کاهش متناسب عرض grid */
    }
    
         .webinars-grid .row {
         justify-content: center;
         max-width: 100%; /* استفاده کامل از عرض grid */
         margin: 0;
         display: flex;
         flex-wrap: wrap;
         gap: 0;
     }
    
    .webinars-grid .col-md-6,
    .webinars-grid .col-lg-4 {
        flex: 0 0 100%; /* کارت‌های تکی در tablet */
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* کارت‌های تکی با حداکثر عرض در tablet */
    .webinars-grid .webinar-card {
        width: 100%;
        max-width: 100%; /* استفاده کامل از فضا */
        margin: 0;
    }
}

/* Mobile: 1 card per row with full width */
@media (max-width: 767px) {
    .webinar-archive-content .container {
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .webinar-archive-content .row {
        gap: 15px; /* فاصله مناسب در mobile */
        flex-direction: column; /* sidebar روی grid */
    }
    
    .webinar-archive-content .col-lg-3,
    .webinar-archive-content .col-md-4 {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .webinar-archive-content .col-lg-9,
    .webinar-archive-content .col-md-8 {
        width: 100%;
    }
    
         .webinars-grid .row {
         justify-content: center;
         max-width: 100%; /* استفاده کامل از عرض */
         margin: 0;
         display: flex;
         flex-wrap: wrap;
         gap: 0;
     }
    
    .webinars-grid .col-lg-4,
    .webinars-grid .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }
    
    /* کارت‌های تکی با حداکثر عرض در mobile */
    .webinar-card {
        width: 100%;
        max-width: 100%; /* استفاده کامل از عرض mobile */
        margin: 0;
    }
}

/* Pagination */
.webinar-pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.webinar-pagination.search-hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* Loading State Styles */
.loading-state, .error-state {
    padding: 3rem 1rem !important;
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-state p {
    margin-top: 1rem;
    color: #666;
    font-size: 1.1rem;
}

.error-state h3 {
    color: #dc3545;
    margin-bottom: 1rem;
}

.error-state i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
}

.webinar-placeholder {
    background: #f8f9fa;
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

/* OPTIMIZED Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    backdrop-filter: blur(2px);
    border-radius: 8px;
    transition: opacity 0.2s ease;
}

.loading-overlay .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 0.2em;
}

.loading-overlay p {
    margin-top: 0.5rem;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Performance: Reduce animations during filtering */
.filtering-mode .webinar-card {
    transition: none !important;
    animation: none !important;
}

.filtering-mode .webinar-card:hover {
    transform: none !important;
}

/* Fix for AJAX loaded cards styling - Normal Bootstrap grid */
.webinars-grid .row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
    justify-content: space-between;
    align-items: stretch;
}

.webinars-grid .col-lg-4 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 1.8rem;
}

@media (min-width: 1200px) {
    .webinars-grid .col-lg-4 {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-width: 480px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .webinars-grid .col-lg-4 {
        flex: 1 1 calc(50% - 8px);
        max-width: calc(50% - 8px);
        min-width: 450px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .webinars-grid .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .webinars-grid .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Ensure webinar cards maintain proper structure */
.webinar-card {
    display: block;
    width: 100%;
    height: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Enhanced webinar card content for larger cards */
@media (min-width: 992px) {
    .webinar-card-content {
        padding: 0.9rem;
    }
    
    .webinar-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        line-height: 1.4;
        font-weight: 600;
    }
    
    .webinar-meta {
        margin-bottom: 1.2rem;
    }
    
    .meta-row {
        margin-bottom: 0.8rem;
    }
    
    .webinar-date,
    .webinar-time,
    .webinar-speaker,
    .webinar-duration {
        font-size: 0.95rem;
        padding: 0.4rem 0;
    }
    
    .webinar-price {
        font-size: 1.05rem;
        font-weight: 600;
    }
    
    .btn-view-webinar {
        padding: 0.9rem 1.6rem;
        font-size: 0.95rem;
        font-weight: 500;
    }
}

.webinar-pagination .nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.webinar-pagination .nav-links a,
.webinar-pagination .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 1rem;
    background: white;
    color: var(--medium-gray);
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.webinar-pagination .nav-links a:hover {
    background: var(--primary-blue);
    color: white;
}

.webinar-pagination .nav-links .current {
    background: var(--primary-blue);
    color: white;
}

/* No Webinars */
.no-webinars {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.no-webinars h2 {
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.no-webinars p {
    color: var(--medium-gray);
}

/* Sort and View Options Styles */
.sort-container {
    margin-top: 0.75rem;
}

.sort-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.sort-select:hover {
    border-color: var(--primary-blue);
}

.view-options {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
    background: #f3f4f6;
    padding: 0.25rem;
    border-radius: 8px;
}

.view-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem;
    border: none;
    background: transparent;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-toggle:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

.view-toggle.active {
    background: white;
    color: var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.view-toggle i {
    font-size: 0.875rem;
}

.view-toggle span {
    font-weight: 600;
}

/* List View Styles - JavaScript inline styles approach like showcase page */
.webinars-grid.list-view .col-lg-4 {
    width: 100%;
    max-width: 100%;
    flex: none;
    margin-bottom: 1rem;
}

/* Supporting styles for list view - minimal CSS since we use inline styles */
.webinar-card {
    transition: all 0.3s ease;
}

/* Ensure images fill their container in list view */
.webinar-card img {
    transition: all 0.3s ease;
}

/* Backup CSS for list view in case inline styles don't work */
@media (min-width: 769px) {
    .webinars-grid.list-view .webinar-card[style*="display: flex"] {
        display: flex !important;
        flex-direction: row !important; /* عکس سمت چپ */
        height: 360px !important;
        overflow: hidden !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-card-image {
        width: 50% !important; /* 50-50 تقسیم */
        height: 100% !important;
        flex-shrink: 0 !important;
        position: relative !important;
        order: 1 !important; /* عکس سمت چپ */
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-card-image a {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: unset !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-card-image img,
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-card-image .webinar-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-card-content {
        width: 50% !important; /* 50-50 تقسیم */
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        padding: 1.5rem !important;
        order: 2 !important; /* محتوا سمت راست */
        overflow-y: visible !important; /* بدون اسکرول */
    }
    
    /* بهینه‌سازی محتوای داخل کارت در حالت list view - برای فضای 50% */
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-title {
        font-size: 1.05rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.7rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-meta {
        margin-bottom: 0.7rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .meta-row {
        padding: 0.4rem 0.6rem !important;
        margin-bottom: 0.4rem !important;
        gap: 0.5rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-date,
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-time,
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-speaker,
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-duration,
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-sessions {
        font-size: 0.85rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-footer {
        padding-top: 0.6rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .webinar-price {
        font-size: 0.95rem !important;
    }
    
    .webinars-grid.list-view .webinar-card[style*="display: flex"] .btn-view-webinar {
        padding: 0.75rem 1.2rem !important;
        font-size: 0.9rem !important;
        margin-top: 0.5rem !important;
    }
}

/* Mobile responsiveness for list view - use JavaScript inline styles */
@media (max-width: 768px) {
    .webinars-grid.list-view .col-lg-4 {
        width: 100%;
    }
} 