/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Amiri', Arial, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    direction: rtl;
}

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

/* النافذة المنبثقة */
.modal {
    display: flex;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.5s ease-in;
}

.modal-content {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 3px solid #d4af37;
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f1c40f, #d4af37);
}

.modal-header {
    background: linear-gradient(135deg, #2c5530, #27ae60);
    color: white;
    padding: 30px 20px;
    text-align: center;
    position: relative;
}

.modal-header h2 {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 10px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.islamic-decoration {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 10px auto;
    position: relative;
}

.islamic-decoration::before,
.islamic-decoration::after {
    content: '✦';
    position: absolute;
    color: #d4af37;
    font-size: 12px;
    top: -8px;
}

.islamic-decoration::before {
    left: -10px;
}

.islamic-decoration::after {
    right: -10px;
}

.modal-body {
    padding: 30px;
    text-align: center;
}

.prayer-text {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 25px;
    border-right: 4px solid #27ae60;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.prayer-text p {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #2c5530;
    margin-bottom: 8px;
    font-weight: 600;
}

.name-input-section {
    margin-top: 25px;
}

#visitor-name {
    width: 100%;
    padding: 15px;
    border: 2px solid #d4af37;
    border-radius: 10px;
    font-size: 1rem;
    text-align: center;
    font-family: 'Cairo', sans-serif;
    background: #ffffff;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

#visitor-name:focus {
    outline: none;
    border-color: #27ae60;
    box-shadow: 0 0 10px rgba(39, 174, 96, 0.3);
    transform: scale(1.02);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.amen-btn {
    background: linear-gradient(135deg, #27ae60, #2c5530);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
    font-family: 'Cairo', sans-serif;
}

.amen-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #2c5530, #27ae60);
}

/* الترويسة */
.header {
    background: linear-gradient(135deg, #2c5530, #27ae60, #2c5530);
    color: white;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="islamic" patternUnits="userSpaceOnUse" width="20" height="20"><path d="M10 0L20 10L10 20L0 10Z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23islamic)"/></svg>');
    opacity: 0.3;
}

.header-decoration {
    height: 5px;
    background: linear-gradient(90deg, #d4af37, #f1c40f, #d4af37);
    position: relative;
}

.header-decoration.bottom {
    margin-top: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 2;
}

.logo-section {
    text-align: center;
    flex: 1;
}

.islamic-symbol {
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(212, 175, 55, 0.5); }
    to { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(212, 175, 55, 0.8); }
}

.main-title {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.designer-credit {
    font-size: 0.9rem;
    opacity: 0.8;
    font-style: italic;
}

.palestine-flag {
    font-size: 4rem;
    animation: wave 2s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}

/* المحتوى الرئيسي */
.main-content {
    padding: 60px 0;
}

.section-title {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #2c5530;
    position: relative;
}

.title-decoration {
    color: #d4af37;
    margin: 0 15px;
    font-size: 1.5rem;
}

/* قسم الترحيب */
.welcome-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid #d4af37;
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f1c40f, #d4af37);
}

.islamic-border-top,
.islamic-border-bottom {
    height: 3px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 20px 0;
    position: relative;
}

.islamic-border-top::before,
.islamic-border-top::after,
.islamic-border-bottom::before,
.islamic-border-bottom::after {
    content: '✦';
    position: absolute;
    color: #d4af37;
    font-size: 16px;
    top: -8px;
}

.islamic-border-top::before,
.islamic-border-bottom::before {
    left: 20px;
}

.islamic-border-top::after,
.islamic-border-bottom::after {
    right: 20px;
}

.welcome-text {
    font-family: 'Amiri', serif;
    font-size: 1.3rem;
    text-align: center;
    color: #27ae60;
    font-weight: 600;
    line-height: 1.8;
}

/* شبكة الدروس */
.lessons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.lesson-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: #d4af37;
}

.lesson-card.featured {
    border: 2px solid #d4af37;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
}

.lesson-card.featured::before {
    content: '⭐';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    z-index: 2;
}

.card-header {
    background: linear-gradient(135deg, #2c5530, #27ae60);
    color: white;
    padding: 25px 20px;
    text-align: center;
    position: relative;
}

.lesson-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.card-header h3 {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.card-content {
    padding: 25px 20px;
}

.card-content p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 15px;
}

.lesson-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

.lesson-count,
.lesson-type {
    background: #f8f9fa;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #666;
    border: 1px solid #e9ecef;
}

.lesson-type {
    background: linear-gradient(135deg, #d4af37, #f1c40f);
    color: white;
    border: none;
}

.card-footer {
    padding: 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.lesson-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #27ae60, #2c5530);
    color: white;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.lesson-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.4);
    background: linear-gradient(135deg, #2c5530, #27ae60);
}

/* قسم الدعاء */
.prayer-section {
    background: linear-gradient(135deg, #2c5530, #27ae60);
    color: white;
    padding: 50px 40px;
    border-radius: 20px;
    margin: 50px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.prayer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="prayer" patternUnits="userSpaceOnUse" width="30" height="30"><circle cx="15" cy="15" r="2" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23prayer)"/></svg>');
}

.prayer-content {
    position: relative;
    z-index: 2;
}

.prayer-title {
    font-family: 'Amiri', serif;
    font-size: 2rem;
    margin-bottom: 25px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.prayer-section .prayer-text {
    font-family: 'Amiri', serif;
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 15px;
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
    color: white;
    opacity: 0.95;
}

/* التذييل */
.footer {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-decoration {
    width: 100px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
    margin: 15px auto;
}

.footer-text {
    font-family: 'Amiri', serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.9;
}

.designer-info {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-top: 10px;
}

/* الرسوم المتحركة */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.lesson-card {
    animation: slideInUp 0.6s ease-out;
}

.lesson-card:nth-child(2) { animation-delay: 0.1s; }
.lesson-card:nth-child(3) { animation-delay: 0.2s; }
.lesson-card:nth-child(4) { animation-delay: 0.3s; }
.lesson-card:nth-child(5) { animation-delay: 0.4s; }
.lesson-card:nth-child(6) { animation-delay: 0.5s; }

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .palestine-flag {
        margin-top: 20px;
        font-size: 3rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .lessons-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .welcome-section,
    .prayer-section {
        padding: 30px 20px;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.7rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .lesson-card {
        margin-bottom: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    #visitor-name {
        font-size: 0.9rem;
        padding: 12px;
    }
    
    .amen-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

