/* الألوان الأساسية الموحدة */
:root {
    --barca-blue: #004d98;
    --barca-red: #a50044;
    --gold: #edbb00;
    --dark-bg: #051123;
    --light-gray: #f0f0f0;
}

body {
    background-color: var(--dark-bg);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
    line-height: 1.6;
}

/* --- نفس تنسيق البار العلوي من الصفحة الرئيسية --- */
.navbar {
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    padding: 10px 0;
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.navbar li {
    margin: 0 15px;
}

.navbar li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 17px;
    padding: 10px 15px;
    transition: 0.3s;
    display: block;
}

.navbar li a:hover,
.navbar li a.active {
    color: var(--gold);
    background-color: var(--barca-red);
    border-radius: 5px;
}

/* --- تنسيق الصور والعناوين --- */
.hero-section,
.logo-evolution-section {
    background: linear-gradient(180deg, var(--barca-blue), var(--barca-red));
    padding: 50px 20px;
    text-align: center;
    margin-bottom: 30px;
}

.history-img,
.evolution-img {
    width: 300px;
    border-radius: 15px;
    border: 4px solid var(--gold);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transition: 0.4s;
}

.history-img:hover {
    transform: scale(1.05);
}

.img-caption {
    font-size: 18px;
    color: var(--gold);
    margin-top: 15px;
    font-weight: bold;
}

/* --- تنسيق محتوى النص --- */
.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

.history-text {
    font-size: 20px;
    text-align: justify;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-left: 5px solid var(--barca-red);
    border-radius: 10px;
}

mark {
    background-color: var(--gold);
    color: black;
    padding: 2px 5px;
    border-radius: 3px;
}

/* --- زر "See More" --- */
.more-btn-container {
    text-align: center;
    margin: 30px 0;
}

.btn-primary {
    background-color: var(--barca-red);
    color: white;
    border: 2px solid var(--gold);
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-primary:hover {
    background-color: var(--barca-blue);
    transform: translateY(-3px);
}

/* --- الترقيم الموحد --- */
.pagination {
    text-align: center;
    padding: 40px 0;
}

.pagination a {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    background-color: var(--barca-red);
    border: 1px solid var(--gold);
    margin: 0 5px;
    border-radius: 5px;
    transition: 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background-color: var(--gold);
    color: black;
}

/* --- التعديلات الخاصة بمتصفحات الموبايل (History Page) --- */

@media screen and (max-width: 768px) {

    /* 1. ضبط الصور لتناسب عرض الشاشة الصغير */
    .history-img,
    .evolution-img {
        width: 90%;
        /* الصورة تأخذ 90% من عرض الشاشة */
        max-width: 300px;
        /* لا تزيد عن حجمها الأصلي */
    }

    /* 2. تعديل محتوى النص */
    .content-wrapper {
        padding: 10px;
    }

    .history-text {
        font-size: 17px;
        /* تصغير الخط قليلاً للقراءة المريحة */
        text-align: center;
        /* التوسيط أفضل في الموبايل بدل الـ justify */
        padding: 20px 15px;
        border-left: none;
        /* إلغاء الخط الجانبي */
        border-bottom: 5px solid var(--barca-red);
        /* وضعه في الأسفل كشكل جمالي */
    }

    /* 3. تعديل الـ Navbar (نفس فكرة صفحة الـ Home لتوحيد الشكل) */
    .navbar ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar li {
        margin: 5px 8px;
    }

    .navbar li a {
        font-size: 14px;
        padding: 8px 10px;
    }

    /* 4. تعديل زر See More */
    .btn-primary {
        width: 80%;
        /* الزر يكون عريض وسهل الضغط عليه بالإصبع */
        padding: 12px;
    }
}

/* قاعدة عامة لحماية الصور من الخروج عن الإطار */
img {
    max-width: 100%;
    height: auto;
}