/* تنسيقات مؤتمر الزيتون - Simple Version */
.olive-conf-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    animation: oliveFadeIn 0.3s ease;
    direction: rtl;
    font-family: 'Cairo', 'Segoe UI', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    box-sizing: border-box;
}

.olive-conf-container {
    position: relative;
    max-width: 500px;
    width: calc(100% - 40px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9f7 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    border: 2px solid #8B7355;
    animation: oliveSlideUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: 90vh;
    overflow-y: auto;
    margin: 0 auto;
    /* تحسينات للتمرير على الجوال */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* زر الإغلاق محسّن */
.close-olive-conf {
    position: fixed;
    top: 10px;
    left: 15px;
    background: #8B7355;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.2s;
    display: block;
    align-items: center;
    justify-content: center;
    /* تحسينات للجوال */
    min-height: 44px;
    min-width: 44px;
}

.close-olive-conf:hover {
    background: #A0522D;
    transform: scale(1.1);
}

/* الهيدر محسّن */
.olive-conf-header {
    background: #556B2F;
    color: white;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
}

.logo {
    display: flex;
    height: 20px;
    width: 30px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.logo h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
}

.subtitle {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

/* المحتوى الرئيسي محسّن */
.olive-conf-content {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

/* قسم الإعلان محسّن */
.section-title {
    font-size: 28px; 
    font-weight: bold; 
    color: #000000 !important; 
    text-align: center; 
    margin-bottom: 15px; 
    position: relative; 
    line-height: 1.3;
}

.section-title::after {
    content: "";
    display: block;
    width: 100px; /* طول الخط */
    height: 3px; /* سماكة الخط */
    background-color: #A0522D; /* لون الخط */
    margin: 8px auto 0 auto; /* وضع الخط تحت العنوان */
    border-radius: 2px; /* حواف مستديرة للخط */
}

.announcement-section {
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 1.2rem;
}

.announcement-text {
    font-size: 1rem;
    color: #333;
    margin: 0;
    line-height: 1.5;
}

.register-link {
    color: #3c501b;
    font-weight: 600;
    text-decoration: none;
    margin-right: 5px;
    display: inline-block;
    padding: 2px 0;
}

.register-link:hover {
    text-decoration: underline;
    color: #556B2F;
}

/* قسم الجدول الزمني محسّن */
.timeline-section {
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 28px !important; 
    font-weight: bold !important; 
    color: #000000 !important; 
    text-align: center; 
    margin-bottom: 15px; 
    position: relative; 
    line-height: 1.3;
}

.simple-table-container {
    overflow-x: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    /* تحسينات للجوال */
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

/* الجدول المحسن للشاشات الصغيرة */
.simple-table {
    width: 100%; /* تغيير من 80% إلى 100% لشغل المساحة المتاحة */
    margin: 20px auto;
    border-collapse: collapse;
    font-family: 'Cairo', Arial, sans-serif;
    font-size: 1rem;
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    min-width: 300px; /* الحد الأدنى للعرض */
}

/* رأس الجدول */
.simple-table thead {
    background: linear-gradient(to right, #8B7355, #A0522D);
    color: #fff;
    font-weight: 700;
}

.simple-table th {
    padding: 12px 15px;
    text-align: center;
    white-space: nowrap;
}

/* صفوف الجدول */
.simple-table tbody tr {
    transition: background-color 0.3s;
}

.simple-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.simple-table tbody tr:hover {
    background-color: #f0f5e9;
}

/* خلايا الجدول */
.simple-table td {
    padding: 10px 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
    word-break: break-word; /* لكسر الكلمات الطويلة */
}

/* أول عمود */
.simple-table td:first-child {
    text-align: right;
    font-weight: 500;
    color: #444;
}

/* آخر عمود */
.simple-table td:last-child {
    text-align: left;
    font-weight: 500;
    color: #556B2F;
}

/* إزالة الحدود السفلية للصف الأخير */
.simple-table tr:last-child td {
    border-bottom: none;
}

/* قسم التسجيل محسّن */
.registration-section {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.simple-registration-btn {
    display: inline-block;
    background: linear-gradient(to right, #556B2F, #6B8E23);
    color: white;
    text-decoration: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #4a5c29;
    box-shadow: 0 4px 10px rgba(85, 107, 47, 0.3);
    min-height: 44px; /* الحد الأدنى للجوال */
    min-width: 44px;
}

.simple-registration-btn:hover {
    background: linear-gradient(to right, #6B8E23, #7aa02c);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(85, 107, 47, 0.4);
}

.simple-registration-btn:active {
    transform: translateY(0);
}

/* الفوتر محسّن */
.olive-conf-footer {
    background: #f8f8f8;
    color: #333;
    padding: 15px 20px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    font-size: 0.9rem;
}

.contact-info p {
    margin: 5px 0;
    line-height: 1.5;
}

.contact-phone {
    font-weight: 600;
    color: #556B2F;
}

/* تنسيق الهيدر المعدل - الشعار والعنوان جنباً إلى جنب */
.olive-conf-header {
    background: #556B2F;
    color: white;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-container {
    flex-shrink: 0;
}

.olive-logo {
    height: 100px;      /* كان 40px */
    width: auto;
    max-width: 70px;   /* كان 100px */
    object-fit: contain;
}

.title-container {
    flex:1;
    min-width: 200px;
    text-align: center;
}

.title-container h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight:700;
    line-height: 1.3;
}

/* تحسينات للشاشات المتوسطة والصغيرة */
@media (max-width: 768px) {
    .header-content {
        gap: 15px;
        flex-direction: column;
        text-align: center; }
    
    .title-container h2 { font-size: 1.2rem; }
    
    .olive-logo {
    height: 50 !important; /* قلل من 50px */
    width: auto !important;
    max-width: 100px; /* قلل من 120px */
    object-fit: contain;    }
}

@media (max-width: 480px) {
    .olive-conf-header { padding: 12px 15px;}
    
    .header-content {  gap: 10px; }
    
    .title-container h2 {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .olive-logo {height: 60px  !important;      /* أصغر للجوال */max-width: auto; }
 
    .timeline-image img {
        width: 200px;
    }
}

/* تأثيرات الحركة محسّنة */
@keyframes oliveFadeIn {
    from { 
        opacity: 0; 
        backdrop-filter: blur(0);
    }
    to { 
        opacity: 1; 
        backdrop-filter: blur(5px);
    }
}

@keyframes oliveSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============== تصميم متجاوب مع تحسينات كبيرة =============== */

/* شاشات متوسطة (أقل من 768px) */
@media (max-width: 768px) {
    .olive-conf-overlay {
        padding: 15px;
    }
    
    .olive-conf-container {
        max-width: 85vw; /* زيادة من 50vw إلى 85vw */
        max-height: 85vh; /* زيادة من 45vh إلى 85vh */
        margin: 0 auto;
        border-radius: 12px;
    }
    
    .olive-conf-header {
        padding: 15px;
    }
    
    .logo h2 {
        font-size: 1.2rem;
    }
    
    .olive-conf-content {
        padding: 15px;
    }
    
    .section-title,
    .section-subtitle {
        font-size: 24px !important;
    }
    
    .simple-table {
        font-size: 0.9rem;
        width: 100%;
    }
    
    .simple-table th,
    .simple-table td {
        padding: 10px 8px;
    }
}

/* شاشات صغيرة (أقل من 480px) - تحسينات كبيرة */
@media (max-width: 480px) {


    
    @keyframes oliveSlideUpMobile {
        from {
            opacity: 0;
            transform: translateY(20px) scale(0.98);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
    
    .olive-conf-header {
        padding: 15px 12px;
    }
    
    .logo {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo h2 {
        font-size: 1.1rem;
        text-align: center;
        line-height: 1.4;
    }
    
    .olive-conf-content {
        padding: 12px;
    }
    
    .section-title,
    .section-subtitle {
        font-size: 20px !important; /* حجم مناسب للجوال */
        margin-bottom: 10px;
    }
    
    .announcement-section {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .simple-table-container {
        border-radius: 6px;
        margin-bottom: 15px;
    }
    
    .simple-table {
        font-size: 0.85rem;
        min-width: 100%;
        margin: 10px auto;
        border-radius: 6px;
    }
    
    .simple-table th,
    .simple-table td {
        padding: 8px 6px;
        border: 1px solid #e0e0e0 !important;
    }
    
    .simple-table th:first-child,
    .simple-table td:first-child {
        border-left: 1px solid #e0e0e0 !important;
    }
    
    .simple-table th:last-child,
    .simple-table td:last-child {
        border-right: 1px solid #e0e0e0 !important;
    }
    
    .simple-table tr:last-child td {
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    .simple-registration-btn {
        padding: 10px 25px;
        font-size: 0.95rem;
        border-radius: 20px;
        min-height: 44px;
        min-width: 160px;
    }
    
    /* تحسين التمرير الداخلي */
    .olive-conf-container {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    
    .table-container {
        max-height: 200px;
        overflow-y: auto;
    }
}

/* شاشات صغيرة جداً (أقل من 360px) */
@media (max-width: 360px) {
    .olive-conf-container {
        max-width: 98vw !important;
        max-height: 95vh !important;
        border-radius: 8px;
    }
    
    .logo h2 {
        font-size: 1rem;
    }
    
    .section-title,
    .section-subtitle {
        font-size: 18px !important;
    }
    
    .announcement-section {
        font-size: 0.95rem;
    }
    
    .simple-table {
        font-size: 0.8rem;
    }
    
    .simple-table th,
    .simple-table td {
        padding: 6px 4px;
        font-size: 0.8rem;
    }
    
    .simple-registration-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        min-width: 140px;
    }
    
    .olive-conf-footer {
        padding: 12px 15px;
        font-size: 0.85rem;
    }
}

/* تحسينات للوضع الأفقي على الجوال */
@media (max-height: 500px) and (orientation: landscape) {
    .olive-conf-overlay {
        padding: 5px;
        align-items: flex-start;
    }
    
    .olive-conf-container {
        max-height: 95vh;
        margin-top: 5px;
    }
    
    .table-container {
        max-height: 150px;
    }
    
    .simple-table th,
    .simple-table td {
        padding: 6px 8px;
    }
}

/* تحسينات إضافية للجدول على الشاشات الصغيرة */
@media (max-width: 480px) {
    /* جعل الجدول أكثر سلاسة على الجوال */
    .simple-table-container {
        border: none;
        background: transparent;
    }
    
    .simple-table {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    /* تحسين قابلية النقر على الروابط */
    .register-link,
    .phone-number,
    .simple-registration-btn {
        cursor: pointer;
    }
    
    /* تحسين المسافات */
    .timeline-section {
        margin-bottom: 15px;
    }
    
    .registration-section {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* تحسينات إمكانية الوصول */
@media (prefers-reduced-motion: reduce) {
    .olive-conf-overlay,
    .olive-conf-container,
    .simple-registration-btn {
        animation: none;
        transition: none;
    }
}

/* تحسينات للشاشات العريضة */
@media (min-width: 1200px) {
    .olive-conf-container {
        max-width: 40vw;
    }
}



@media (max-width: 768px) {

    .olive-conf-overlay {
        align-items: center;   /* توسيط حقيقي */
        padding: 20px;
    }

    .olive-conf-container {
        width: 100%;
        max-width: 420px;      /* 👈 نافذة حقيقية */
        max-height: 75vh;      /* 👈 ليست شاشة كاملة */
        border-radius: 16px;
    }
     .timeline-image img {
        width: 220px;
    }
}

@media (max-width: 480px) {

    .olive-conf-overlay {
        padding: 15px;
        align-items: center;
        justify-content: center;
    }

    .olive-conf-container {
        width: 100%;
        max-width: 360px;     /* 👈 حجم نافذة واضح */
        max-height: 70vh;     /* 👈 يمنع ملء الشاشة */
        border-radius: 14px;
    }

    .olive-conf-content {
        padding: 12px;
    }
}
/* صورة قبل الجدول */
.timeline-image {
    text-align: center;
    margin: 15px 0 20px 0; /* مسافة قبل وبعد */
    border-radius: 15px 15px 0 0 ;
}

.timeline-image img {
    max-width: 100%;
    width: 350px;          /* حجم مناسب */
    height: auto;
    display: inline-block;
}
