@import "animation.css";
@import "variables.css";
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&display=swap');

/* ========== تحسينات للصفحات الفرعية ========== */

/* Header للصفحات الفرعية */
.page-header {
    height: 50vh !important;
    min-height: 400px;
}

.page-header .hero-content {
    padding-top: 0;
}

.page-header #logo {
    font-size: clamp(2rem, 6vw, 3.5rem) !important;
}

.page-header .hero-subtitle p {
    font-size: 1.2rem;
    margin-top: 15px;
}

/* زر العودة */
.back-btn {
    color: white !important;
    text-decoration: none !important;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* تحسينات لقسم المقدمة */
.intro-section {
    padding: 60px 0;
    text-align: center;
}

.intro-section .section-title h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.intro-section .section-title p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-top: 15px;
}

/* قسم الجدول الزمني */
.timeline-section {
    padding: 40px 20px 80px;
}

/* ========== تحسينات عناصر التاريخ ========== */

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.re {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    margin: 25px 0;
    padding: 30px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.re::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 215, 0, 0.2), transparent);
    transition: left 0.6s ease;
}

.re:hover::before {
    left: 100%;
}

.re:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 215, 0, 0.3);
}

.re #date {
    color: var(--gold, #ffd700);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.re #title {
    color: white;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.re #des {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 10px;
}

/* ========== تحسينات متجاوبة ========== */

@media (max-width: 768px) {
    .page-header {
        height: 40vh !important;
        min-height: 350px;
    }
    
    .page-header #logo {
        font-size: 2rem !important;
    }
    
    .intro-section .section-title h2 {
        font-size: 2rem;
    }
    
    .re {
        margin: 20px 0;
        padding: 20px;
    }
    
    .re #title {
        font-size: 1.3rem;
    }
    
    .re #date {
        font-size: 1.2rem;
    }
    
    .back-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* تأثيرات الظهور */
.show {
    animation: slideUp 0.8s ease-out forwards;
}

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

/* ========== النوافذ المنبثقة ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-in;
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #fff;
    margin: 20px auto;
    padding: 0;
    border: none;
    width: 90%;
    max-width: 800px;
    min-height: auto;
    max-height: 90vh;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
    overflow: hidden;
    direction: rtl;
    font-family: 'Cairo', sans-serif;
    position: relative;
}

.modal-header {
    background: linear-gradient(135deg, #8bc34a, forestgreen);
    color: white;
    padding: 20px;
    position: relative;
    flex-shrink: 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
    text-align: center;
    padding-right: 40px;
}

.modal-header p {
    margin: 10px 0 0 0;
    text-align: center;
    font-size: 1.2em;
    opacity: 0.9;
}

.modal-body {
    padding: 30px;
    line-height: 1.8;
    color: #333;
    max-height: calc(90vh - 200px);
    overflow-y: auto;
    flex-grow: 1;
    /* تحسين شريط التمرير */
    scrollbar-width: thin;
    scrollbar-color: #8bc34a #f1f1f1;
}

/* تحسين شريط التمرير للمتصفحات المبنية على Webkit */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: #8bc34a;
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: forestgreen;
}

.modal-body p {
    margin-bottom: 20px;
    font-size: 1.1em;
}

.modal-body ul {
    margin: 15px 0;
    padding-right: 20px;
}

.modal-body li {
    margin: 10px 0;
    font-size: 1.05em;
}

.close {
    position: absolute;
    top: 10px;
    left: 15px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.close:hover,
.close:focus {
    color: #ff4444;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* تأثيرات الأنيميشن */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* تحسين تأثير التفاعل مع العناصر */
.re {
    cursor: pointer;
    transition: all 0.3s ease;
}

.re:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(139, 195, 74, 0.4);
}

/* استجابة للشاشات الصغيرة */
@media screen and (max-width: 800px) {
    .modal {
        padding: 10px 0;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-header h2 {
        font-size: 1.4em;
        padding-right: 40px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(95vh - 120px);
        font-size: 0.95em;
    }
    
    .modal-body p {
        font-size: 1em;
        margin-bottom: 15px;
    }
    
    .modal-body li {
        font-size: 0.95em;
        margin: 8px 0;
    }

    .close {
        top: 8px;
        left: 10px;
        font-size: 28px;
        width: 35px;
        height: 35px;
    }

.re:nth-child(even) {
    align-self: center;
}

.content{
    align-items: center;
}
	
header #copyrights {
    font-size: 12px;
}

}

@media screen and (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 5px auto;
    }
    
    .modal-header h2 {
        font-size: 1.2em;
        line-height: 1.3;
    }
    
    .modal-body {
        padding: 15px;
        max-height: calc(95vh - 100px);
    }
}
