/* متغیرهای رنگی - الگو گرفته از Time.ir و درخواست کاربر */
:root {
    --mjc-bg: transparent;
    --mjc-card-bg: #ffffff;
    --mjc-primary: #0093a3; /* آبی فیروزه‌ای تیره (رنگ اصلی سایت) */
    --mjc-primary-dark: #007682;
    --mjc-text-dark: #333333;
    --mjc-text-gray: #666666;
    --mjc-holiday: #d32f2f; /* قرمز برای روزهای تعطیل/جمعه */
    --mjc-holiday-bg: #fff5f5; /* هاله قرمز روز تعطیل */
    --mjc-custom: #1e3a8a; /* آبی تیره برای رویدادهای دستی */
    --mjc-custom-bg: #eff6ff; /* هاله آبی روز دستی */
    --mjc-border: #e8e8e8;
}

/* ساختار کلی (راست‌چین و ارث‌بری فونت) */
.mjc-wrapper {
    display: flex;
    flex-wrap: wrap-reverse; /* تقویم سمت راست، رویداد سمت چپ در حالت RTL */
    gap: 25px;
    background-color: var(--mjc-bg);
    font-family: inherit; /* سازگاری ۱۰۰٪ با فونت المنتور */
    direction: rtl;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* =========================================
   پنل رویدادها (سمت چپ)
========================================= */
.mjc-events-card {
    flex: 1.5 1 380px; /* افزایش سهم عرض پنل رویدادها (مقدار قبلی 1 1 320px بود) */
    background: var(--mjc-card-bg);
    border: 1px solid var(--mjc-border);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.mjc-events-header {
    background: #f9f9f9;
    padding: 20px;
    border-bottom: 1px solid var(--mjc-border);
    border-radius: 10px 10px 0 0;
}

.mjc-events-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--mjc-primary);
    font-family: inherit;
    font-weight: bold;
    text-align: right;
}

.mjc-events-body {
    padding: 15px;
    max-height: 660px;
    overflow-y: auto;
}

.mjc-event-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mjc-event-item {
    display: flex;
    gap: 12px; /* کمی کاهش فاصله برای زیبایی بیشتر */
    padding: 10px 10px;
    border-bottom: 1px dashed #ddd;
    font-size: 12px; /* تغییر سایز فونت به ۱۲ پیکسل طبق درخواست شما */
    line-height: 1.6;
    transition: background 0.3s;
}

.mjc-event-item:last-child {
    border-bottom: none;
}

.mjc-event-item:hover {
    background: #fdfdfd;
}

.mjc-e-date {
    font-weight: bold;
    color: var(--mjc-text-dark);
    white-space: nowrap;
    min-width: 65px; /* کاهش عرض تاریخ متناسب با سایز فونت ۱۲ */
}

.mjc-e-text {
    color: var(--mjc-text-gray);
}

/* رنگ‌بندی داینامیک در لیست رویدادها */
.mjc-event-item.is-holiday .mjc-e-date,
.mjc-event-item.is-holiday .mjc-e-text {
    color: var(--mjc-holiday);
}

.mjc-event-item.is-custom .mjc-e-date,
.mjc-event-item.is-custom .mjc-e-text {
    color: var(--mjc-custom);
}

/* =========================================
   پنل تقویم (سمت راست)
========================================= */
.mjc-calendar-card {
    flex: 2 1 450px;
    background: var(--mjc-card-bg);
    border: 1px solid var(--mjc-border);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

/* طراحی گیره‌های بالای تقویم (شبیه فنر کلاسیک) */
.mjc-cal-rings {
    position: absolute;
    top: -15px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    padding: 0 25%;
    box-sizing: border-box;
    z-index: 2;
}

.mjc-cal-rings .ring {
    width: 16px;
    height: 35px;
    background: linear-gradient(to bottom, #f0f0f0 0%, #a1a1a1 100%);
    border-radius: 10px;
    border: 1px solid #999;
    box-shadow: inset 0 -2px 5px rgba(0,0,0,0.2), 0 3px 5px rgba(0,0,0,0.1);
}

/* هدر تقویم */
.mjc-cal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 20px 20px;
    border-bottom: 2px solid var(--mjc-primary); /* خط فیروزه‌ای زیر هدر */
}

.mjc-arrow-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: var(--mjc-primary);
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.mjc-arrow-btn:hover {
    background: var(--mjc-primary);
    color: white;
    border-color: var(--mjc-primary);
}

.mjc-cal-title h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--mjc-text-dark);
    font-family: inherit;
}

.mjc-gregorian-range {
    display: block;
    font-size: 0.85rem;
    color: var(--mjc-text-gray);
    margin-top: 6px;
    text-align: center;
}

/* بدنه تقویم (روزها) */
.mjc-cal-body {
    padding: 15px;
}

.mjc-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: #ffffff; /* رنگ متن سفید */
    background-color: var(--mjc-primary-dark); /* پس‌زمینه آبی تیره مشابه عکس */
    padding: 12px 0;
    border-radius: 8px; /* گوشه‌های گرد مشابه عکس */
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.mjc-weekdays div:last-child {
    color: #ffffff; /* برای اینکه در نوار آبی، کلمه جمعه هم سفید بماند */
}

.mjc-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-top: 15px;
}

/* سلول‌های روز */
.mjc-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 75px;
    background: #fdfdfd;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mjc-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.mjc-day:not(.empty):hover {
    background: #f0fbfc;
    border-color: var(--mjc-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,147,163,0.1);
}

/* روز جاری */
.mjc-day.today {
    border: 2px solid var(--mjc-primary);
    background: #e8f9fa;
}

/* استایل روزهای تعطیل (جمعه‌ها و مناسبت‌ها) - قرمز */
.mjc-day.is-holiday {
    background: var(--mjc-holiday-bg);
    border-color: #ffd6d6;
}
.mjc-day.is-holiday .mjc-d-fa {
    color: var(--mjc-holiday);
}
.mjc-day.is-holiday .mjc-d-sub {
    color: #e57373;
}

/* استایل روزهای رویداد دستی - آبی تیره */
.mjc-day.has-custom {
    background: var(--mjc-custom-bg);
    border-color: #bfdbfe;
}
.mjc-day.has-custom .mjc-d-fa {
    color: var(--mjc-custom);
}
.mjc-day.has-custom .mjc-d-sub {
    color: #60a5fa;
}

/* اعداد و فونت داخل روز */
.mjc-d-fa {
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--mjc-text-dark);
    line-height: 1;
    margin-bottom: 8px;
}

.mjc-d-sub {
    display: flex;
    justify-content: space-between;
    width: 85%;
    font-size: 0.7rem;
    color: #999;
}

/* دکمه سراسری "برو به امروز" */
.mjc-today-btn {
    display: block;
    width: 100%;
    background: var(--mjc-primary);
    color: #ffffff;
    border: none;
    padding: 15px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 0 0 10px 10px;
    transition: background 0.3s;
    margin-top: auto;
}

.mjc-today-btn:hover {
    background: var(--mjc-primary-dark);
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .mjc-wrapper {
        flex-direction: column;
        gap: 20px;
    }
    .mjc-events-card {
        order: 2;
    }
    .mjc-calendar-card {
        order: 1;
    }
    .mjc-day {
        height: 60px;
    }
    .mjc-d-fa {
        font-size: 1.2rem;
    }
    .mjc-d-sub {
        font-size: 0.65rem;
    }
    .mjc-cal-rings .ring {
        height: 25px;
    }
}
/* استایل‌های لودینگ تقویم */
.mjc-wrapper {
    position: relative;
}

.mjc-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    border-radius: 10px;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mjc-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #6CA1CB;
    border-radius: 50%;
    animation: mjc-spin 1s linear infinite;
}

@keyframes mjc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* ==================== استایل‌های ساعت المنتور ==================== */

/* محدود کردن استایل‌ها به کانتینر ویجت برای جلوگیری از تداخل */
.elementor-widget-mjc-clock .mjc-clock-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto;
    width: 100%;
}

/* ساعت آنالوگ - کاملا واکنش‌گرا */
.elementor-widget-mjc-clock .mjc-analog-clock {
    width: 100%;
    max-width: 300px; /* حداکثر عرض پیش‌فرض، قابل کنترل از طریق تنظیمات المنتور */
    aspect-ratio: 1 / 1; /* حفظ تناسب دایره کامل در هر ابعادی */
    border-radius: 50%;
    background-color: #fefefe;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
    margin-bottom: 25px;
}

.elementor-widget-mjc-clock .mjc-clock-face {
    width: 100%;
    height: 100%;
    position: relative;
}

.elementor-widget-mjc-clock .mjc-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom;
    background-color: #333;
    border-radius: 10px;
    z-index: 10;
    /* transition برای حرکت نرم‌تر عقربه‌ها (اختیاری) */
    transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44); 
}

.elementor-widget-mjc-clock .mjc-hour-hand {
    width: 6px;
    height: 25%;
    margin-left: -3px;
}

.elementor-widget-mjc-clock .mjc-minute-hand {
    width: 4px;
    height: 35%;
    margin-left: -2px;
}

.elementor-widget-mjc-clock .mjc-second-hand {
    width: 2px;
    height: 40%;
    margin-left: -1px;
    background-color: #228b22; /* رنگ سبز عقربه ثانیه شمار */
    z-index: 11;
}

.elementor-widget-mjc-clock .mjc-clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    background-color: #fff;
    border: 3px solid #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 12;
}

.elementor-widget-mjc-clock .mjc-clock-text {
    position: absolute;
    bottom: 25%;
    width: 100%;
    text-align: center;
    font-family: 'Georgia', serif;
    font-style: italic;
    font-size: 18px;
    color: #444;
}

/* اعداد روی ساعت */
.elementor-widget-mjc-clock .mjc-number {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 22px;
    font-weight: bold;
    color: #444;
}

.elementor-widget-mjc-clock .mjc-num-val { 
    display: inline-block; 
    padding-top: 10px; 
}

/* چرخش اعداد در جایگاه خودشان */
.elementor-widget-mjc-clock .mjc-number-1 { transform: rotate(30deg); } .elementor-widget-mjc-clock .mjc-number-1 .mjc-num-val { transform: rotate(-30deg); }
.elementor-widget-mjc-clock .mjc-number-2 { transform: rotate(60deg); } .elementor-widget-mjc-clock .mjc-number-2 .mjc-num-val { transform: rotate(-60deg); }
.elementor-widget-mjc-clock .mjc-number-3 { transform: rotate(90deg); } .elementor-widget-mjc-clock .mjc-number-3 .mjc-num-val { transform: rotate(-90deg); }
.elementor-widget-mjc-clock .mjc-number-4 { transform: rotate(120deg); } .elementor-widget-mjc-clock .mjc-number-4 .mjc-num-val { transform: rotate(-120deg); }
.elementor-widget-mjc-clock .mjc-number-5 { transform: rotate(150deg); } .elementor-widget-mjc-clock .mjc-number-5 .mjc-num-val { transform: rotate(-150deg); }
.elementor-widget-mjc-clock .mjc-number-6 { transform: rotate(180deg); } .elementor-widget-mjc-clock .mjc-number-6 .mjc-num-val { transform: rotate(-180deg); }
.elementor-widget-mjc-clock .mjc-number-7 { transform: rotate(210deg); } .elementor-widget-mjc-clock .mjc-number-7 .mjc-num-val { transform: rotate(-210deg); }
.elementor-widget-mjc-clock .mjc-number-8 { transform: rotate(240deg); } .elementor-widget-mjc-clock .mjc-number-8 .mjc-num-val { transform: rotate(-240deg); }
.elementor-widget-mjc-clock .mjc-number-9 { transform: rotate(270deg); } .elementor-widget-mjc-clock .mjc-number-9 .mjc-num-val { transform: rotate(-270deg); }
.elementor-widget-mjc-clock .mjc-number-10 { transform: rotate(300deg); } .elementor-widget-mjc-clock .mjc-number-10 .mjc-num-val { transform: rotate(-300deg); }
.elementor-widget-mjc-clock .mjc-number-11 { transform: rotate(330deg); } .elementor-widget-mjc-clock .mjc-number-11 .mjc-num-val { transform: rotate(-330deg); }


/* ساعت دیجیتال */
.mjc-digital-clock {
    font-size: 48px;
    font-weight: 900;
    color: #4b4b4b;
    font-family: 'Impact', 'Arial Black', sans-serif;
    letter-spacing: 2px;
}
