 * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3E67A3;
    --secondary-color: #03A180;
    --accent-color: #BBE7F4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --text-color: #334155;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
    --border-radius: 10px;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecf2 100%);
    min-height: 100vh;
}

.main-content {
    max-width: 1200px;
    width: 100%;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: linear-gradient(to left, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.title-decoration {
    text-align: center;
    margin-bottom: 50px;
    color: var(--secondary-color);
    font-size: 1.2rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.title-decoration i {
    font-size: 1.4rem;
    color: var(--primary-color);
}

/* صورة البانر في الأعلى - تظهر بحجمها الطبيعي (مصغرة) مع التحكم بالعرض والطول */
.hero-image {
    width: 100%;
    margin-bottom: 45px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    background-color: #f0f2f5; /* لون خلفية احتياطي */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto; /* ظهور تمرير أفقي إذا كانت الصورة أكبر من الشاشة */
    overflow-y: auto; /* ظهور تمرير عمودي إذا كانت الصورة أطول من الشاشة */
}

.hero-image img {
    width: auto; /* عرض تلقائي حسب حجم الصورة الأصلي */
    height: auto; /* ارتفاع تلقائي حسب النسبة الأصلية */
    max-width: none; /* إزالة الحد الأقصى للعرض */
    max-height: none; /* إزالة الحد الأقصى للارتفاع */
    display: block;
    transition: transform 0.4s ease;
    border-radius: var(--border-radius);
}

/* تحديد الحجم الأقصى للصورة حسب رغبتك (يمكنك تعديل القيم) */
.hero-image img {
    max-width: 100%; /* أقصى عرض 100% من الحاوية - يمنع خروج الصورة عن الحاوية */
    max-height: 700px; /* أقصى ارتفاع 700px */
}

/* جعل الصورة تتناسب مع كل الشاشات */
@media (max-width: 992px) {
    .hero-image img {
        max-width: 90%; /* تقليل العرض قليلاً في الشاشات المتوسطة */
        max-height: 600px;
    }
}

@media (max-width: 768px) {
    .hero-image {
        margin-bottom: 30px;
        border-radius: 8px;
        justify-content: center;
    }
    
    .hero-image img {
        max-width: 85%; /* عرض 85% من الحاوية للجوال */
        max-height: 500px;
    }
}

@media (max-width: 576px) {
    .hero-image img {
        max-width: 80%; /* عرض 80% من الحاوية للشاشات الصغيرة */
        max-height: 400px;
    }
}

@media (max-width: 480px) {
    .hero-image {
        margin-bottom: 20px;
        border-radius: 6px;
    }
    
    .hero-image img {
        max-width: 95%; /* عرض 95% للشاشات الصغيرة جداً */
        max-height: 350px;
    }
}

.pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.pdf-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(62, 103, 163, 0.1);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.pdf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: var(--transition);
}

.pdf-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 30px rgba(62, 103, 163, 0.2);
}

.pdf-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(3, 161, 128, 0.3);
}

.pdf-icon i {
    font-size: 40px;
    color: white;
}

.pdf-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
    width: 100%;
    line-height: 1.4;
}

.pdf-description {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 20px;
    opacity: 0.8;
    flex-grow: 1;
}

.pdf-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    width: 100%;
    background: var(--accent-color);
    padding: 8px 15px;
    border-radius: 50px;
}

.pdf-meta i {
    margin-left: 5px;
    color: var(--primary-color);
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 14px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(62, 103, 163, 0.3);
    letter-spacing: 0.5px;
}

.pdf-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(3, 161, 128, 0.4);
}

.pdf-btn i {
    font-size: 1.2rem;
}

.badge-new {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(3, 161, 128, 0.3);
    z-index: 1;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 14px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(62, 103, 163, 0.3);
}

.back-btn:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(3, 161, 128, 0.4);
}

.back-btn i {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .main-content {
        margin: 30px auto;
        padding: 0 15px;
    }

    .page-title {
        font-size: 2rem;
    }
    
    .pdf-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .pdf-card {
        padding: 25px 20px;
    }
    
    .pdf-title {
        font-size: 1.2rem;
    }
    
    .pdf-btn {
        padding: 12px 25px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        margin: 20px auto;
        padding: 0 10px;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .title-decoration {
        font-size: 1rem;
    }
    
    .pdf-grid {
        grid-template-columns: 1fr;
    }
    
    .pdf-meta {
        flex-wrap: wrap;
        gap: 10px;
    }

    .back-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
}