/* General Styles */
:root {
    --primary-color: #304166; /* Dark Blue/Grey */
    --secondary-color: #3498db; /* Bright Blue */
    --accent-color: #e74c3c; /* Red for buttons/highlights */
    --text-color: #333;
    --light-bg: #f4f7f6;
    --card-bg: #ffffff;
    --border-color: #ddd;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
}

body {
    font-family: "Cairo", sans-serif;
    line-height: 1.6;
    padding-top: 80px;
    color: var(--text-color);
    background-color: #9ac4d1;
    direction: rtl;
    text-align: right;
}

.logo {
    text-decoration: none;
    color: #ffffff;
    font-size: 30px;
}

a:hover {
    color: #e0f805;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #2980b9;
}

.primary-btn {
    background-color: var(--accent-color);
}

.primary-btn:hover {
    background-color: #c0392b;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: none;
    color: #fff;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar {
    background: linear-gradient(to left, #ffffff, #304166 30%); 
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ---- New Classes for Logo and Title ---- */
.navbar-brand-wrapper {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.custom-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
}

.navbar-custom-logo {
    height: 50px;
    width: auto;
    margin-left: 100px;
    object-fit: contain;
    border-radius: 50%;
}
.site-title-text-custom {
    font-size: 1.8em;
    font-weight: bold;
    margin: 0;
    white-space: nowrap;
}

/* 🛑 تم التعديل: إعداد زر القائمة لسطح المكتب */
.menu-toggle {
    display: none; /* إخفاؤه افتراضياً على الشاشات الكبيرة */
    background: none;
    border: none;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
}

/* ---- Nav Links ---- */
.nav-links {
    list-style:none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-grow: 1;
    justify-content: flex-end;
}

.nav-links li {
    margin-left: 20px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #f39c12;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(to right, #e0f2f7, #c1e4eb);
    color: var(--primary-color);
    text-align: center;
    font-size: 25px;
    padding: 60px 20px;
    min-height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-content-wrapper {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    width: 100%;
}

.hero-image-display,
.hero-text-and-search {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-visual-element {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.hero-visual-element:hover {
    transform: scale(1.03);
}

.hero-text-and-search h1 {
    font-size: 3.2em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.hero-text-and-search p {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 30px;
}

.search-bar {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    background-color: #fff;
    border-radius: 25px;
    overflow: hidden;
    flex-direction: row-reverse;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.search-bar input {
    flex-grow: 1;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    outline: none;
    text-align: right;
}

.search-bar button {
    background-color: var(--secondary-color);
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
    border-radius: 25px;
    margin-right: -25px;
}

.search-bar button:hover {
    background-color: #2980b9;
}


/* Featured Books Section */
.featured-books {
    padding: 60px 20px;
    text-align: center;
}

.featured-books h2 {
    font-size: 36px;
    margin-bottom: 40px;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px 0;
    justify-items: center;
}

.book-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 300px;
    transition: transform 0.2s ease-in-out;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(255, 0, 0);
    border: 3px solid rgb(255, 0, 0);
}

.book-card img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.book-card h3 {
    font-size: 22px;
    margin-bottom: 10px;
    height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.book-card .author {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

/* Star Rating */
.rating {
    color: #f39c12;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    gap: 2px;
}

.rating i.far.fa-star {
    color: #ccc;
}

.large-rating {
    font-size: 24px;
    justify-content: flex-start;
    gap: 5px;
}

.large-rating span {
    font-size: 18px;
    color: #666;
    margin-right: 10px;
    margin-left: 0;
}


/* Call to Action Section */
.call-to-action {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 60px 20px;
    margin-top: 50px;
}

.call-to-action h2 {
    color: #fff;
    font-size: 36px;
    margin-bottom: 20px;
}

.call-to-action p {
    font-size: 18px;
    margin-bottom: 30px;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.social-links a {
    color: #fff;
    font-size: 24px;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* Book Details Page Specific Styles */
.book-details-page {
    padding-top: 40px;
    padding-bottom: 60px;
}

.book-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    align-items: flex-start;
    flex-direction: row-reverse;
}

.book-cover-large {
    flex-shrink: 0;
    width: 300px;
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.book-cover-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.book-details-content {
    flex-grow: 1;
    text-align: right;
}

.book-details-content h1 {
    font-size: 42px;
    margin-bottom: 10px;
}

.book-details-content .author {
    font-size: 20px;
    color: #555;
    margin-bottom: 20px;
}

.book-details-content .author a {
    color: var(--primary-color);
}

.book-details-content .meta-info p {
    font-size: 16px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.book-details-content .meta-info strong {
    color: var(--primary-color);
}

.book-details-content .actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.book-details-content .actions .btn {
    font-size: 16px;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* About Book and Reviews */
.book-description, .user-reviews, .related-books {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.book-description h2, .user-reviews h2, .related-books h2 {
    font-size: 30px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.book-description p {
    font-size: 17px;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* Review Form */
.review-form {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

.review-form h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.review-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 15px;
    direction: rtl;
    text-align: right;
}

.review-form .review-rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 20px;
    color: #f39c12;
    margin-bottom: 20px;
    justify-content: flex-start;
}

.review-form .review-rating span {
    color: var(--text-color);
    margin-right: 10px;
    margin-left: 0;
}

.review-form .review-rating .star-input {
    cursor: pointer;
    transition: color 0.2s ease;
}

.review-form .review-rating .star-input:hover,
.review-form .review-rating .star-input.active {
    color: #f39c12;
}

/* Reviews List */
.review-item {
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.review-item .review-author {
    font-weight: bold;
    font-size: 17px;
    margin-bottom: 5px;
}

.review-item .review-date {
    font-size: 14px;
    color: #777;
    margin-left: 10px;
}

.review-item .rating {
    margin-bottom: 10px;
    justify-content: flex-start;
}

.review-item .review-text {
    font-size: 16px;
    line-height: 1.7;
}


/* Responsive Design */
@media (max-width: 992px) {
    /* Header & Navigation Responsive */
    .navbar {
        flex-direction: row; 
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .navbar-brand-wrapper {
        width: auto;
        /* 🛑 التعديل 1: توسيط العنوان */
        flex-grow: 1; /* للسماح له بالتمدد */
        text-align: center;
        order: 2; /* يوضع في المنتصف بين زر القائمة وشريط البحث */
        margin-bottom: 0;
    }
    
    .custom-logo-link {
        justify-content: center; /* توسيط محتويات العلامة التجارية (الشعار والنص) */
        width: 100%;
    }


    .navbar-custom-logo {
        height: 40px;
        margin-right: 10px;
        /* إزالة هامش 100px الذي قد يؤثر على التوسيط */
        margin-left: 10px; 
    }
    
    .site-title-text-custom {
        font-size: 1.5em;
    }

    /* 🛑 التعديل 2: نقل زر القائمة إلى اليسار (الـ End في سياق RTL) */
    .menu-toggle {
        display: block;
        order: 3; /* يوضع في أقصى اليسار */
        position: relative;
        margin-right: 0;
        margin-left: auto; /* لدفعه إلى أقصى اليسار */
    }

    /* 🛑 تم التعديل: إعداد القائمة للانتقال إلى عرض عمودي عند التفعيل */
    .nav-links {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-top: 10px;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: var(--primary-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-links li {
        margin: 10px 0;
        width: 100%;
    }

    .nav-links.active {
        display: flex;
    }

    /* 🛑 تم التعديل: شريط البحث (يجب أن يكون في أقصى اليمين أو مخفيًا) */
    .search-bar-header {
        /* تم نقله إلى أقصى اليمين في RTL عبر order: 1 */
        display: flex;
        order: 1; 
        width: auto;
        margin-left: 15px; /* مسافة عن اللوجو */
        margin-right: 0;
    }
    .search-bar-header .search-form {
        max-width: 100%; 
    }

    /* Hero Section Responsive */
    .hero-content-wrapper {
        flex-direction: column;
        gap: 20px;
        color: var(--primary-color);
    }

    .hero-image-display,
    .hero-text-and-search {
        max-width: 100%;
        flex: none;
    }

    .hero-visual-element {
        max-width: 80%;
    }

    .hero-text-and-search h1 {
        font-size: 2.5em;
    }

    .hero-text-and-search p {
        font-size: 1.1em;
    }

    .search-bar {
        flex-direction: column;
    }
    
    .search-bar input,
    .search-bar button {
        width: 100%;
        border-radius: 0;
    }
    
    .search-bar input {
        border-bottom: 1px solid var(--border-color);
    }


    /* General Responsive Adjustments */
    .hero-content h1 {
        font-size: 36px;
    }

    .hero-content p {
        font-size: 25px;
        text-align: center;
    }

    
    .books-grid {
        grid-template-columns: 1fr;
    }

    .book-card {
        max-width: 300px;
        margin: 0 auto;
    }

    /* Book Details Page Responsive Adjustments */
    .book-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .book-details-content {
        text-align: center;
    }

    .book-details-content .actions {
        justify-content: center;
    }

    .book-details-content h1 {
        font-size: 36px;
    }

    .book-details-content .author,
    .book-details-content .large-rating {
        font-size: 18px;
    }
}

@media (max-width: 576px) {
    .book-cover-large {
        width: 250px;
        height: 333px;
    }

    .book-details-content h1 {
        font-size: 30px;
    }

    .book-details-content .actions .btn {
        width: 100%;
        justify-content: center;
    }

    .book-description h2, .user-reviews h2, .related-books h2 {
        font-size: 26px;
    }

    .review-form .review-rating {
        flex-direction: column;
        align-items: flex-start;
    }

    .review-form .review-rating span {
        margin-left: 0;
        margin-bottom: 10px;
    }
}

/* Categories Page Specific Styles */
.categories-page .page-header {
    text-align: center;
    padding: 40px 20px 20px;
}

.categories-page .page-header h1 {
    font-size: 40px;
    margin-bottom: 10px;
}

.categories-page .page-header p {
    font-size: 18px;
    color: #ffffff;
}

.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.category-card {
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    text-align: center;
    padding: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 18px rgb(255, 0, 0);
    border: 3px solid rgb(255, 0, 0);
}

.category-card a {
    color: var(--primary-color);
    display: block;
}

.category-card a:hover {
    color: var(--secondary-color);
}

.category-card i {
    font-size: 50px;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.category-card h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.category-card p {
    color: #777;
    font-size: 16px;
}

/* Books by Category Section (if used - placeholder styles) */
.books-by-category {
    padding: 60px 20px;
    margin-top: 50px;
    background-color: var(--card-bg);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.books-by-category h2 {
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}

.filter-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 15px;
    flex-direction: row-reverse;
}

.filter-sort-bar .sort-by {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.filter-sort-bar .sort-by label {
    font-size: 16px;
    color: var(--text-color);
    margin-right: 10px;
    margin-left: 0;
}

.filter-sort-bar .sort-by select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    background-color: #fff;
    cursor: pointer;
    direction: rtl;
    text-align: right;
}

.pagination {
    display: flex;
    gap: 5px;
    justify-content: flex-end;
}

.pagination .page-link {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--secondary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--secondary-color);
    color: #fff;
}

.pagination .page-link.active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

/* Responsive adjustments for categories page */
@media (max-width: 768px) {
    .category-list {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .category-card i {
        font-size: 40px;
    }

    .category-card h3 {
        font-size: 20px;
    }

    .books-by-category h2 {
        font-size: 30px;
    }

    .filter-sort-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .pagination {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .category-list {
        grid-template-columns: 1fr;
    }
}





/* ---- Contact Us Page Styles ---- */
.contact-page {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--light-bg);
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 50px;
    border: 3px solid rgb(255, 0, 0);

}

.contact-page .page-title {
    font-size: 3.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 15px;
    display: inline-block;
}

.contact-page .lead-text {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.contact-info-section {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-bottom: 60px;
}

.contact-card {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    text-align: center;
    width: 100%;
    max-width: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid rgb(255, 0, 0);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgb(255, 0, 0);
}

.contact-card i {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.contact-card h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.contact-card p {
    font-size: 1em;
    color: #555;
}

.contact-card a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-form-section {
    background-color:#d4d4d4;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: right;
}

.contact-form-section h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-size: 1.1em;
    color: var(--primary-color);
    margin-bottom: 8px;
    font-weight: bold;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    direction: rtl;
    text-align: right;
}

.contact-form textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.4);
}

.contact-form .btn {
    width: auto;
    padding: 12px 30px;
    font-size: 1.1em;
    margin-top: 10px;
}

/* Responsive adjustments for Contact Page */
@media (max-width: 768px) {
    .contact-page .page-title {
        font-size: 2.5em;
    }

    .contact-info-section {
        flex-direction: column;
        align-items: center;
    }

    .contact-card {
        max-width: 90%;
    }

    .contact-form-section {
        padding: 25px;
    }

    .contact-form-section h2 {
        font-size: 1.8em;
    }
}






/* ---- About Us Page Styles ---- */
.about-page {
    padding: 60px 20px;
    text-align: center;
    background-color: #dce4e2;
    border-radius: 8px;
    margin-top: 30px;
    margin-bottom: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.about-page .page-title {
    font-size: 3.2em;
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 3px solid var(--border-color);
    padding-bottom: 15px;
    display: inline-block;
}

.about-page .lead-text {
    font-size: 1.2em;
    color: var(--text-color);
    margin-bottom: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.8;
}

.about-section {
    display: flex;
    flex-direction: row-reverse;
    align-items: flex-start;
    gap: 30px;
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 6px 10px rgb(255, 0, 0);
    margin-bottom: 30px;
    border: 3px solid #ff0000;
    text-align: right;
}


/* 🛑 تم التعديل: التأكد من ظهور الأيقونات داخل الدوائر الزرقاء */
.about-section .section-icon {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: #fff;
    font-size: 2.5em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    /* ⚠️ تأكد أن الأيقونات نفسها تستخدم كلاس Font Awesome (مثل i class="fas fa-eye") */
}

.about-section .section-content {
    flex-grow: 1;
}

.about-section h2 {
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.about-section p {
    font-size: 1.1em;
    line-height: 1.7;
    color: #555;
}

.about-section ul {
    list-style: none;
    padding-right: 0;
    margin-top: 15px;
}

.about-section ul li {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #555;
    position: relative;
    padding-right: 25px;
}

.about-section ul li:last-child {
    margin-bottom: 0;
}

/* 🛑 تم التعديل: التأكد من ظهور علامة الصح Font Awesome */
.about-section ul li::before {
    content: "\f00c"; /* Font Awesome solid check icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900; /* مطلوب لـ Font Awesome 5 Solid */
    color: var(--secondary-color);
    position: absolute;
    right: 0;
    top: 3px;
}

/* Team Section Specifics */
.team-section .team-members {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.team-member-card {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    text-align: center;
    width: 100%;
    max-width: 220px;
}

.team-member-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 4px solid var(--secondary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.team-member-card h4 {
    font-size: 1.3em;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.team-member-card p {
    font-size: 0.95em;
    color: #777;
}

.team-section .note {
    font-size: 0.9em;
    color: #888;
    margin-top: 20px;
    text-align: center;
}

/* Responsive adjustments for About Page */
@media (max-width: 992px) {
    .about-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    .about-section:nth-child(even) {
        flex-direction: column;
        text-align: center;
    }

    .about-section .section-icon {
        margin-bottom: 15px;
    }

    .about-section ul {
        padding-right: 0;
        text-align: right;
    }
    .about-section ul li {
        /* 🛑 تم التعديل: إرجاع padding-right لإظهار العلامة في وضع الهاتف */
        padding-right: 25px; 
    }
    .about-section ul li::before {
        /* 🛑 تم التعديل: إرجاع الوضع المطلق لضمان ظهور العلامة على اليمين */
        position: absolute; 
        right: 0;
        top: 3px;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    .about-page .page-title {
        font-size: 2.5em;
    }
    .about-page .lead-text {
        font-size: 1.1em;
    }
    .about-section {
        padding: 25px;
        gap: 15px;
    }
    .about-section h2 {
        font-size: 1.8em;
    }
    .about-section p, .about-section ul li {
        font-size: 1em;
    }
}

@media (max-width: 576px) {
    .team-member-card {
        max-width: 100%;
    }
}




/* ==================================== */
/* 🛠️ أنماط شريط البحث في الرأس (Header) */
/* ==================================== */

.search-bar-header {
    /* يدفع شريط البحث إلى اليسار (في تصميم RTL) */
    margin-right: 15px; 
    display: flex;
    align-items: center;
}

.search-bar-header .search-form {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 20px;
    overflow: hidden;
    background-color: #f8f9fa; /* لون فاتح للخلفية */
    max-width: 250px;
}

.search-bar-header input[type="text"] {
    padding: 6px 15px;
    border: none;
    outline: none;
    flex-grow: 1;
    font-size: 14px;
    background: transparent;
    text-align: right; /* محاذاة النص لليمين */
}

.search-bar-header .btn {
    background-color: #007bff; /* أزرق */
    color: white;
    border: none;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    line-height: 1; /* لضمان توسيط الأيقونة */
}

.search-bar-header .btn:hover {
    background-color: #0056b3;
}

/* 📱 إخفاء شريط البحث في الشاشات الصغيرة لتوفير المساحة */
@media (max-width: 992px) {
    /* 🛑 تم إلغاء الإخفاء هنا لأننا نستخدمه ونعدل ترتيبه في وضع الاستجابة */
    .search-bar-header {
        display: flex; /* تأكد من ظهوره */
    }
}

/* ==================================== */
/* ✨ أنماط قسم الهيرو (Hero Section) */
/* ==================================== */

.hero-section {
    /* تأكد من وجود صورة باسم hero-bg.jpg في مجلد static/images/ */
    /*background: url("{% static 'images/hero-bg.jpg' %}") center/cover no-repeat; */
    background-color: #2c3e50;
    height: 40vh; 
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white; 
    position: relative;
    padding: 20px 0;
}

/* طبقة تظليل لجعل النص مقروءًا */
.hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5); 
    z-index: 1;
}

.hero-content {
    z-index: 2; 
    max-width: 90%;
}

.hero-content h1 {
    font-size: 3em;
    margin-bottom: 0.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.2em;
    margin-bottom: 2em;
}

/* ==================================== */
/* 🔎 أنماط شريط البحث الكبير (داخل الهيرو) */
/* ==================================== */

.hero-section .search-bar {
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.hero-section .search-bar form {
    display: flex;
    background-color: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-section .search-bar input[type="text"] {
    flex-grow: 1;
    padding: 15px 25px;
    border: none;
    outline: none;
    font-size: 17px;
    text-align: right;
    /* إلغاء الحواف الدائرية من جهة الزر */
    border-radius: 0; 
}

.hero-section .search-bar button {
    background-color: #ffc107; /* أصفر */
    color: #333;
    border: none;
    padding: 0 25px;
    font-size: 17px;
    cursor: pointer;
    transition: background-color 0.3s;
    /* تطبيق الحواف الدائرية على جهة الزر */
    border-radius: 0 30px 30px 0; 
}

.hero-section .search-bar button:hover {
    background-color: #e0a800;
}

/* 📱 تعديلات الهيرو للشاشات الأصغر */
@media (max-width: 768px) {
    .hero-section {
        height: 30vh;
        min-height: 250px;
    }
    .hero-content h1 {
        font-size: 2em;
    }
    .hero-content p {
        font-size: 1em;
        margin-bottom: 1em;
    }
    .hero-section .search-bar input[type="text"] {
        padding: 12px 20px;
        font-size: 15px;
    }
    .hero-section .search-bar button {
        padding: 0 15px;
        font-size: 15px;
    }
}

/* ==================================== */
/* 🔎 أنماط صفحة نتائج البحث */
/* ==================================== */
.page-header {
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 2em;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.search-summary {
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.highlight-query {
    font-weight: bold;
    color: #007bff;
    background-color: #f0f8ff;
    padding: 2px 5px;
    border-radius: 4px;
}

.no-results {
    grid-column: 1 / -1; /* لجعل رسالة عدم وجود النتائج تأخذ عرض الشبكة بالكامل */
    text-align: center;
    padding: 50px 20px;
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
    border-radius: 8px;
    margin: 40px 0;
}

.no-results i {
    font-size: 2em;
    margin-bottom: 15px;
    display: block;
}