body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f4f7f6;
    color: #333;
}
a{
    text-decoration: none !important;
}
h1 {
    color: #2c3e50;
    font-weight: 700;
}

/* Search Bar Styling */
.search-form .input-group {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.07);
    border-radius: 10px;
    overflow: hidden; /* عشان يخلي الـ border-radius يشتغل صح على كل العناصر */
}

.search-input {
    border: none;
    padding: 15px 20px;
    font-size: 1.1em;
    border-radius: 0 10px 10px 0; /* Bootstrap 5 يحتاج تحديد الزوايا الفردية في RTL */
}

.search-input:focus {
    box-shadow: none;
    border-color: transparent;
}

.search-button {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    padding: 15px 25px;
    font-size: 1.1em;
    border-radius: 10px 0 0 10px; /* Bootstrap 5 يحتاج تحديد الزوايا الفردية في RTL */
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* Sidebar Styling (Study Phases) */
.sidebar {
    padding-right: 0; /* إزالة الـ padding الافتراضي لليمين */
}

.sidebar .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.sidebar-header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    border-top-right-radius: 12px;
    border-top-left-radius: 12px;
}

.sidebar-header h5 {
    font-weight: 600;
    display: flex;
    align-items: center;
}

.sidebar-header .fas {
    margin-left: 10px; /* مسافة بين الأيقونة والنص */
}

.study-phases-list .list-group-item {
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #e0e6ed;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}

.study-phases-list .list-group-item:last-child {
    border-bottom: none;
    border-bottom-right-radius: 12px;
    border-bottom-left-radius: 12px;
}

.study-phases-list .list-group-item a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    display: block;
}

.study-phases-list .list-group-item.active {
    background-color: #e6f7ee; /* لون للخيار النشط */
    color: #28a745;
    font-weight: 700;
}

.study-phases-list .list-group-item:hover {
    background-color: #e9f0f7;
}

/* Notebook Card Styling */
.notebook-card {
    height: 400px !important;
    border: none;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
}

.notebook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.notebook-image-wrapper {
    height: 250px; /* ارتفاع ثابت لصور الأغلفة */
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f0f0f0;
}

.notebook-cover-image {
    width: 100%;
    height: 100%;
    max-width: 250px;
    object-fit: fill; /* لضمان تغطية الصورة للمساحة دون تشويه */
    transition: transform 0.3s ease;
}

.notebook-card:hover .notebook-cover-image {
    transform: scale(1.05);
}

.notebook-card .card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.notebook-card .card-title {
    font-size: 1.25em;
    font-weight: 700;
    color: #34495e;
    margin-bottom: 10px;
}

.notebook-card .card-text {
    font-size: 0.9em;
    color: #666;
}

.notebook-price {
    font-size: 1.3em;
    font-weight: 700;
    color: #28a745; /* لون أخضر للسعر */
}

.btn-add-to-cart {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-add-to-cart:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        margin-bottom: 25px;
        padding-right: 15px; /* استعادة الـ padding الافتراضي في الشاشات الصغيرة */
    }
    .search-input, .search-button {
        border-radius: 8px !important; /* لتوحيد الـ border-radius في الشاشات الصغيرة */
    }
    .search-button {
        width: 100%;
        margin-top: 10px;
    }
    .input-group {
        flex-wrap: wrap; /* للسماح بالـ wrap للبحث والزر */
    }
    .input-group > :not(:first-child):not(.dropdown-menu):not(.dropdown-toggle) {
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }
}
