/* General Styles */
:root {
    --primary-color: #B8860B;
    --secondary-color: #DAA520;
    --accent-color: #CD853F;
    --light-color: #FAF0E6;
    --dark-color: #8B4513;
    --text-color: #2F4F4F;
    --border-color: #DDD8C4;
    --gold-light: #F5DEB3;
    --gold-dark: #B8860B;
    --beige-light: #F5F5DC;
    --beige-dark: #D2B48C;
}

html, body {
    font-family: 'Cairo', sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
}

/* Preloader removed to optimize page loading */

/* Header */
.header-section {
    background-color: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sticky-header {
    background-color: rgba(255, 255, 255, 0.97);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 15px 0;
    transition: padding 0.3s ease;
}

.sticky-header .navbar {
    padding: 10px 0;
}

.logo {
    max-height: 50px;
    transform: scale(1.5);
}
.img-book{
    width: 100%;
    height: 250px;
    object-fit: cover;}
.nav-link {
    font-weight: 600;
    color: var(--dark-color);
    margin: 0 10px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.login-btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.92)),
                url('/img/lib/banner.jpg') center/cover no-repeat;
    padding: 86px 0 130px;
    position: relative;
    z-index: 1;
    /* overflow: hidden; */
}


/* Additional search styles and animations */
.search-focused {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 30px 80px rgba(30, 123, 133, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
}

.search-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
    z-index: -1;
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.voice-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.voice-animation-dot {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    margin: 0 8px;
    animation: voiceWave 1.5s infinite ease-in-out;
}

.voice-animation-dot:nth-child(1) {
    animation-delay: 0s;
}

.voice-animation-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.voice-animation-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes voiceWave {
    0%, 100% {
        transform: scale(0.5);
        background: var(--primary-color);
    }
    50% {
        transform: scale(1.2);
        background: var(--secondary-color);
    }
}

/* Make main search title shine */
@keyframes titleShine {
    0% {
        background-position: -100%;
    }
    100% {
        background-position: 200%;
    }
}

.search-title {
    background: linear-gradient(120deg, #7a5c36 30%, var(--primary-color) 50%, #7a5c36 70%);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: titleShine 4s linear infinite;
    font-family: 'Cairo', serif;
    font-weight: 800;
    letter-spacing: 0.5px;
}

@keyframes patternFloat {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

@keyframes patternFloatReverse {
    0% {
        background-position: 100px 100px;
    }
    100% {
        background-position: 0 0;
    }
}

.main-title {
    font-weight: 800;
    font-size: 3.2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
    position: relative;
    display: inline-block;
}

.main-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    width: 80px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    border-radius: 2px;
}

.subtitle {
    font-size: 1.4rem;
    color: var(--dark-color);
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.search-container {
    /*max-width: 800px;*/
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(250, 240, 230, 0.95) 0%, rgba(245, 245, 220, 0.98) 100%);
    backdrop-filter: blur(8px);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(184, 134, 11, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    position: relative;
    transform: translateY(0);
    transition: all 0.4s ease;
    border: 2px solid rgba(184, 134, 11, 0.1);
    z-index: 10;
}

.search-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(184, 134, 11, 0.2), 0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}



.search-container:hover::before {
    opacity: 0.12;
    filter: blur(12px);
}

.search-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.search-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.25);
    position: relative;
    border: 3px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.search-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    opacity: 0.5;
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 123, 133, 0.4);
        transform: scale(1);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(30, 123, 133, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 123, 133, 0);
        transform: scale(1);
    }
}

.search-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0;
    position: relative;
    display: inline-block;
}

.search-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.search-form .input-group {
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.search-form .search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-input-group {
    margin-bottom: 5px;
}
.ltr .search-form .form-control{
     border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 35px;
    border-bottom-left-radius: 35px;
}
.search-form .form-control {
    border-radius: 35px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: 75px;
    font-size: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding-right: 55px;
    padding-left: 25px;
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    color: var(--dark-color);
    font-weight: 500;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
}

.search-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(30, 123, 133, 0.1), inset 0 2px 5px rgba(0, 0, 0, 0.03);
    background-color: #fff;
    outline: none;
}

.search-form .form-control::placeholder {
    color: #aaa;
    opacity: 0.8;
    font-weight: 400;
}
.ltr .search-action-icons {
    right: 20px;
    left: auto;}
.search-action-icons {
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.search-action-icons span {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 123, 133, 0.08);
    color: var(--primary-color);
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-action-icons span:hover {
    background: rgba(30, 123, 133, 0.15);
    transform: scale(1.1);
}

.search-action-icons .voice-search:hover {
    animation: pulse 1.5s infinite;
}
.ltr .search-btn{
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 35px;
    border-bottom-right-radius: 35px;
}
.search-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1.2rem;
    height: 75px;
    min-width: 130px;
    /*border-radius: 0 50px 50px 0;*/
 border-radius: 35px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    padding: 0 35px;
    transition: all 0.4s ease;
    letter-spacing: 0.5px;
    border: none;
    box-shadow: 0 10px 20px rgba(30, 123, 133, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.search-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 12px 25px rgba(30, 123, 133, 0.3);
}

.search-btn:hover::before {
    left: 100%;
}

.search-suggestions {
    position: relative;
    top: 100%;
    right: 0;
    left: 0;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    z-index: 100;
    opacity: 0;
}

.search-suggestions.active {
    max-height: 300px;
    opacity: 1;
    padding: 15px 0;
}

.suggestion-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item:hover {
    background: rgba(30, 123, 133, 0.05);
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    background: rgba(30, 123, 133, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-left: 15px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 3px;
}

.suggestion-info {
    font-size: 0.9rem;
    color: #777;
}

.suggestion-category {
    font-size: 0.75rem;
    padding: 3px 12px;
    background: rgba(30, 123, 133, 0.08);
    color: var(--primary-color);
    border-radius: 20px;
    margin-right: 10px;
}

.search-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.custom-radio {
    margin: 0 8px;
}

.custom-radio .form-check-input {
    display: none;
}

.custom-radio .form-check-label {
    font-size: 1rem;
    font-weight: 600;
    color: #777;
    padding: 8px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.ltr .custom-radio .form-check-label i {
    margin-left: auto;
    margin-right: 8px;}
.custom-radio .form-check-label i {
    margin-left: 8px;
    font-size: 0.9rem;
}

.custom-radio .form-check-input:checked + .form-check-label {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    box-shadow: 0 5px 15px rgba(30, 123, 133, 0.2);
    transform: translateY(-2px);
}

.trending-searches {
    text-align: center;
    font-size: 0.9rem;
}

.trending-label {
    color: #777;
    margin-left: 10px;
}

.trending-tag {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--secondary-color);
    border-radius: 20px;
    margin: 0 5px 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(88, 185, 166, 0.2);
}

.trending-tag:hover {
    background: rgba(88, 185, 166, 0.1);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Section General */
.section-padding {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-weight: 700;
    font-size: 2.2rem;
    color: var(--primary-color);
    position: relative;
    margin-bottom: 15px;
    display: inline-block;
}

.title-decoration {
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 0 auto;
    margin-top: 10px;
}

/* News Section */
.news-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.news-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.news-title {
    font-size: 1.3rem;
    color: var(--dark-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.news-excerpt {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: #666;
}

.btn-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-link i {
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.btn-link:hover {
    color: var(--secondary-color);
}

.btn-link:hover i {
    transform: translateX(-5px);
}

/* Background Pattern */
.bg-light-pattern {
    background-color: #f9f8f6;
    position: relative;
    overflow: hidden;
}

.bg-light-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48ZyBmaWxsPSJub25lIiBzdHJva2U9IiMxZTdiODUiIHN0cm9rZS13aWR0aD0iMC41IiBvcGFjaXR5PSIwLjA1Ij48cGF0aCBkPSJNNDUgMzBsLTEyIDEyTDE1IDMwbDE4LTE4eiIvPjxwYXRoIGQ9Ik0zMCAwdjYwIi8+PHBhdGggZD0iTTAgMzBoNjAiLz48L2c+PC9zdmc+');
    opacity: 0.2;
    z-index: 0;
}

/* Legacy Categories Section - Updated for compatibility */
.category-card:not(.modern-card) {
    background-color: #fff;
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.category-card:not(.modern-card)::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease;
    z-index: -1;
}

.category-card:not(.modern-card):hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(30, 123, 133, 0.15);
}

.category-card:not(.modern-card):hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.category-card:not(.modern-card) .category-icon {
    background-color: rgba(30, 123, 133, 0.1);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 2px dashed transparent;
}

.category-card:not(.modern-card) .category-icon i {
    font-size: 36px;
    color: var(--primary-color);
    transition: all 0.5s ease;
}

.category-card:not(.modern-card):hover .category-icon {
    background-color: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.3);
    transform: rotate(360deg);
}

.category-card:not(.modern-card):hover .category-icon i {
    color: #fff;
    transform: scale(1.1);
}

.category-card:not(.modern-card) .category-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.category-card:not(.modern-card) p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.category-card:not(.modern-card) .btn {
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.category-card:not(.modern-card) .btn:hover {
    background-color: var(--primary-color);
    color: #fff;
}

.category-card:not(.modern-card) .btn i {
    margin-right: 5px;
    transition: transform 0.3s ease;
}

.category-card:not(.modern-card) .btn:hover i {
    transform: translateX(-5px);
}

/* Publications Section */
.book-card {
    text-align: center;
    margin-bottom: 30px;
}
.main-pdf{
    padding: 25px 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}
.pdf-cover{
        border-radius: 0 !important;
    box-shadow: none !important;
}
.pdf-cover img{
 width: 100px !important; height: 150px !important;
}
.book-cover {
    position: relative;
    margin-bottom: 20px;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.book-cover img {
    width: 100%;
    transition: transform 0.3s ease;
}

.book-overlay {
    position: absolute;
    border-radius: 10px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 123, 133, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.book-card:hover .book-overlay {
    opacity: 1;
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

.book-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.book-author {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
}

.book-rating {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* Related Sites */
.site-card {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 1;
    border: 1px solid var(--border-color);
}

.site-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.site-logo {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: contain;
    margin-bottom: 20px;
    border: 5px solid rgba(30, 123, 133, 0.1);
}

.site-name {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.site-description {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

/* Newsletter Section */
.newsletter-section {
    padding: 60px 0;
}

.newsletter-container {
    background: linear-gradient(45deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 15px;
    padding: 50px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.newsletter-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI2MCIgaGVpZ2h0PSI2MCIgdmlld0JveD0iMCAwIDYwIDYwIj48ZyBmaWxsPSJub25lIiBzdHJva2U9IiNmZmYiIHN0cm9rZS13aWR0aD0iMC41IiBvcGFjaXR5PSIwLjEiPjxwYXRoIGQ9Ik00NSAzMGwtMTIgMTJMMTUgMzBsMTgtMTh6Ii8+PHBhdGggZD0iTTMwIDB2NjAiLz48cGF0aCBkPSJNMCAzMGg2MCIvPjwvZz48L3N2Zz4=');
    opacity: 0.2;
    z-index: 0;
}

.newsletter-container h3 {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 15px;
}

.newsletter-container p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0;
}

.newsletter-form .form-control {
    height: 54px;
    border-radius: 50px 0 0 50px;
    border: none;
    padding-right: 20px;
}

.newsletter-form .form-control:focus {
    box-shadow: none;
}

.subscribe-btn {
    background-color: var(--accent-color);
    color: #fff;
    font-weight: 600;
    height: 54px;
    border-radius: 0 50px 50px 0;
    padding: 0 30px;
    transition: all 0.3s ease;
    border: none;
}

.subscribe-btn:hover {
    background-color: #cf8f47;
    color: #fff;
}

/* Footer */
.main-footer {
    background-color: #2d3b48;
    color: #fff;
    padding-top: 80px;
}

.footer-logo {
    margin-bottom: 25px;
}

.footer-logo img {
   margin-bottom: 35px;
    transform: scale(1.5);
}

.footer-logo p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--accent-color);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: block;
}

.footer-links a:hover {
    color: #fff;
    transform: translateX(-5px);
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.footer-contact li i {
    width: 25px;
    color: var(--accent-color);
    margin-left: 10px;
}

.social-links {
    margin-top: 30px;
    display: flex;
}

.social-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--accent-color);
    color: #fff;
}

.footer-bottom {
    background-color: #24313d;
    padding: 20px 0;
}

.copyright {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.terms, .privacy {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.terms:hover, .privacy:hover {
    color: #fff;
}

/* Scroll to Top */
.btn-scroll-top {
    border: 0px;
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    z-index: 99;
    transition: all 0.3s ease;
}

.btn-scroll-top.active {
    opacity: 1;
    visibility: visible;
}

.btn-scroll-top:hover {
    background-color: var(--secondary-color);
}


/* Enhanced Search Input */
.search-form .form-control {
    border: 2px solid rgba(126, 95, 47, 0.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05), inset 0 2px 5px rgba(0, 0, 0, 0.03);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(252, 248, 240, 0.8) 100%);
}

.search-form .form-control:focus {
    transform: translateY(-2px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(30, 123, 133, 0.15), inset 0 2px 5px rgba(0, 0, 0, 0.02);
}

/* Book Spine Effect on Focus */
.ltr .search-input-wrapper::before{
    right: 0;
    left: auto;
}
.search-input-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50px 0 0 50px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: -1;
}

.search-input-wrapper:focus-within::before {
    width: 10px;
    opacity: 1;
}

/* Enhanced Search Suggestions */
.search-suggestions {
    border: 1px solid rgba(30, 123, 133, 0.1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.suggestion-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-cover {
    width: 45px;
    height: 65px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
    margin-left: 15px;
    position: relative;
}

.suggestion-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.suggestion-item:hover .suggestion-cover img {
    transform: scale(1.1);
}

.suggestion-icon {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(30, 123, 133, 0.1) 0%, rgba(88, 185, 166, 0.1) 100%);
}

.suggestion-icon::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(circle, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.suggestion-item:hover .suggestion-icon::after {
    opacity: 1;
}

.suggestion-category {
    background: linear-gradient(135deg, rgba(30, 123, 133, 0.08) 0%, rgba(88, 185, 166, 0.08) 100%);
    border: 1px solid rgba(30, 123, 133, 0.1);
    padding: 3px 12px;
    line-height: 1;
    transition: all 0.3s ease;
}

.suggestion-item:hover .suggestion-category {
    background: linear-gradient(135deg, rgba(30, 123, 133, 0.12) 0%, rgba(88, 185, 166, 0.12) 100%);
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05);
}

/* Pattern categories */
.pattern-category {
    position: relative;
    padding-left: 5px;
}

.pattern-category::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.5;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.pattern-category[data-category="حديث"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%231e7b85' stroke-width='1' opacity='0.8'%3E%3Ccircle cx='20' cy='20' r='18'/%3E%3Ccircle cx='20' cy='20' r='12'/%3E%3Cpath d='M20 2v36M2 20h36'/%3E%3C/g%3E%3C/svg%3E");
}

.pattern-category[data-category="تفسير"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23805b36' stroke-width='1' opacity='0.8'%3E%3Cpath d='M10 0L20 10L30 0M0 10L10 20L0 30M10 40L20 30L30 40M40 10L30 20L40 30'/%3E%3Cpath d='M20 10L30 20L20 30L10 20z'/%3E%3C/g%3E%3C/svg%3E");
}

.pattern-category[data-category="فقه"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%231e7b85' stroke-width='1' opacity='0.8'%3E%3Cpath d='M0 20h40M20 0v40M10 10h20v20H10z'/%3E%3Ccircle cx='20' cy='20' r='8'/%3E%3C/g%3E%3C/svg%3E");
}

.pattern-category[data-category="سيرة"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23805b36' stroke-width='1' opacity='0.8'%3E%3Cpath d='M20 0L40 20L20 40L0 20z'/%3E%3Cpath d='M10 10L30 10L30 30L10 30z'/%3E%3Ccircle cx='20' cy='20' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

/* Search button animation */
.search-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(30, 123, 133, 0.3);
}

.search-btn::after {
    content: '';
    position: absolute;
    top: -10px;
    left: -20px;
    width: 60px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: -1;
}

.search-btn:hover::after {
    left: 120%;
}

/* Animated placeholder text */
@keyframes placeholderTypewriter {
    0%, 100% {
        width: 0;
    }
    20%, 80% {
        width: 100%;
    }
}

.typewriter-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    animation: placeholderTypewriter 10s ease infinite;
    border-left: 2px solid var(--primary-color);
}

/* Search options with Islamic pattern backgrounds */
.search-options {
    position: relative;
}
/*
.custom-radio .form-check-label {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231e7b85' fill-opacity='0.03' fill-rule='evenodd'%3E%3Cpath d='M0 20L20 0L40 20L20 40z'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 30px 30px;
}

.custom-radio input[type="radio"]:checked + .form-check-label {
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%231e7b85' fill-opacity='0.08' fill-rule='evenodd'%3E%3Cpath d='M0 20L20 0L40 20L20 40z'/%3E%3C/g%3E%3C/svg%3E");
} */


@keyframes searchHighlight {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.3;
        transform: scale(1);
    }
}

/* Trending searches enhancement */
.trending-searches {
    position: relative;
}

.trending-label {
    color: var(--dark-color);
    opacity: 0.6;
    font-weight: 500;
    margin-left: 8px;
}

.trending-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(30, 123, 133, 0.1);
    color: var(--primary-color);
    font-size: 0.85rem;
    margin: 0 4px 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.trending-tag:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.trending-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: all 0.6s ease;
}

.trending-tag:hover::before {
    left: 100%;
}

/* Modern Categories Section Redesign */
.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 0;
    font-weight: 400;
}

/* 5-column grid for categories */
.col-lg-2-4 {
    flex: 0 0 20%;
    max-width: 20%;
}

@media (max-width: 1199.98px) {
    .col-lg-2-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .col-lg-2-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
/* Modern Category Cards */
.modern-card {
    background: linear-gradient(145deg, #ffffff 0%, #fafafa 100%);
    border-radius: 20px;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(184, 134, 11, 0.1);
    overflow: hidden;
}

.modern-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modern-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(184, 134, 11, 0.15);
}

.modern-card:hover::before {
    transform: scaleX(1);
}

/* Category Icons with unique colors */
.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: relative;
    overflow: hidden;
}

.category-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-icon i {
    font-size: 28px;
    transition: all 0.5s ease;
    z-index: 2;
    position: relative;
}

/* Unique icon colors for each category */
.books-icon {
    background-color: rgba(75, 192, 192, 0.1);
}
.books-icon i {
    color: #4bc0c0;
}
.books-icon::before {
    background: linear-gradient(135deg, #4bc0c0, #36a2eb);
}

.thesis-icon {
    background-color: rgba(255, 99, 132, 0.1);
}
.thesis-icon i {
    color: #ff6384;
}
.thesis-icon::before {
    background: linear-gradient(135deg, #ff6384, #ff9f40);
}

.research-icon {
    background-color: rgba(255, 205, 86, 0.1);
}
.research-icon i {
    color: #ffcd56;
}
.research-icon::before {
    background: linear-gradient(135deg, #ffcd56, #ff6384);
}

.manuscript-icon {
    background-color: rgba(153, 102, 255, 0.1);
}
.manuscript-icon i {
    color: #9966ff;
}
.manuscript-icon::before {
    background: linear-gradient(135deg, #9966ff, #4bc0c0);
}

.journal-icon {
    background-color: rgba(255, 159, 64, 0.1);
}
.journal-icon i {
    color: #ff9f40;
}
.journal-icon::before {
    background: linear-gradient(135deg, #ff9f40, #36a2eb);
}

.modern-card:hover .category-icon {
    transform: scale(1.1);
}

.modern-card:hover .category-icon::before {
    opacity: 1;
}

.modern-card:hover .category-icon i {
    color: #fff;
    transform: scale(1.2);
}

/* Category Image */
.category-image {
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.category-image img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.modern-card:hover .category-image img {
    transform: scale(1.05);
}

/* Category Content */
.category-content {
    margin-bottom: 25px;
}

.category-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark-color);
    line-height: 1.3;
}

.category-description {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

/* Category Stats */
.category-stats {
    display: flex;
    justify-content: center;
    margin-bottom: 0;
}

.stat-item {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-item i {
    font-size: 0.75rem;
}

/* Modern Category Button */
.btn-category {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-category:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.3);
    color: #fff;
}

.btn-category:hover::before {
    left: 100%;
}

.btn-category i {
    transition: transform 0.3s ease;
}

.btn-category:hover i {
    transform: translateX(-3px);
}

/* Explore All Button */
.btn-explore-all {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.btn-explore-all::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.btn-explore-all:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 40px rgba(184, 134, 11, 0.25);
    color: #fff;
}

.btn-explore-all:hover::before {
    left: 100%;
}

.btn-explore-all i:last-child {
    transition: transform 0.3s ease;
}

.btn-explore-all:hover i:last-child {
    transform: translateX(5px);
}

/* Performance optimizations */
.modern-card,
.category-icon,
.category-image img,
.btn-category,
.btn-explore-all {
    will-change: transform;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .category-title {
        font-size: 1rem;
    }

    .category-description {
        font-size: 0.8rem;
    }

    .modern-card {
        padding: 25px 15px;
    }

    .category-icon {
        width: 60px;
        height: 60px;
    }

    .category-icon i {
        font-size: 24px;
    }

    .category-image img {
        height: 120px;
    }
}

/* Simple Centers Section */
.centers-section {
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
}

.center-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 24px;
    border: 1px solid rgba(184, 134, 11, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.center1,.center2,.center3,.center4{
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}
.center1{
    background-image: url('/img/lib/center1.png');
}
.center2{
    background-image: url('/img/lib/center2.png');
}
.center3{
    background-image: url('/img/lib/center3.svg');
    transform: scale(1.2);
}
.center4{
    background-image: url('/img/lib/center4.png');
    transform: scale(1.4);
}
.center-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(184, 134, 11, 0.15);
    border-color: rgba(184, 134, 11, 0.2);
}

.center-icon {
    width: 94px;
    height: 64px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.center-icon i {
    font-size: 28px;
    color: #ffffff;
}

.center-card:hover .center-icon {
    transform: scale(1.1);
}

.center-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 16px;
    line-height: 1.4;
    text-align: center;
}

.center-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.center-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.stat {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat i {
    font-size: 14px;
    width: 16px;
}

.center-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.center-link:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.center-link i {
    transition: transform 0.3s ease;
}

.center-link:hover i {
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
    .search-btn{border-radius: 0;}
    .form-check{margin: 5px; padding: 0;}
    .center-card {
        padding: 24px 20px;
    }

    .center-title {
        font-size: 1.1rem;
    }

    .center-description {
        font-size: 0.9rem;
    }

    .center-stats {
        flex-direction: column;
    }
}

/* Dropdown Hover Transitions */
.navbar-nav .nav-item {
    position: relative;
}

.navbar-nav .dropdown {
    position: relative;
}

.navbar-nav .dropdown-toggle {
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-toggle:hover {
    color: var(--primary-color) !important;
    transform: translateY(-1px);
}

.navbar-nav .dropdown-toggle::after {
    transition: transform 0.3s ease;
}

.navbar-nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-icon {
    transition: transform 0.3s ease;
    margin-right: 5px;
    font-size: 0.75em;
    display: inline-block;
    margin-left: 5px;
}

.dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Enhanced dropdown menu styling */
.dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(184, 134, 11, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 240, 230, 0.95) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(184, 134, 11, 0.1);
    padding: 15px 0;
    min-width: 250px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

/* Show dropdown on hover */
.navbar-nav .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Dropdown items styling */
.dropdown-item {
    padding: 12px 25px;
    color: var(--text-color);
    font-weight: 500;
    border-radius: 10px;
    margin: 2px 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 134, 11, 0.1), transparent);
    transition: left 0.6s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.25);
}

.dropdown-item i {
    margin-left: 8px;
    width: 16px;
    text-align: center;
    transition: transform 0.3s ease;
}

.dropdown-item:hover i {
    transform: scale(1.1);
}

/* Dropdown divider styling */
.dropdown-divider {
    margin: 10px 20px;
    border-top: 1px solid rgba(184, 134, 11, 0.2);
    opacity: 0.5;
}

/* Keep dropdown open on hover over menu */
.dropdown:hover .dropdown-menu,
.dropdown-menu:hover {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Smooth transition for dropdown arrow rotation */
@keyframes rotateArrow {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(180deg);
    }
}

/* Responsive dropdown adjustments */
@media (max-width: 991.98px) {
    .search-options{flex-direction: column !important;}
    .search-form .form-control{border-radius: 0!important;}
    .search-action-icons{display: none;}
    .input-group{flex-direction: column;}
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(250, 240, 230, 0.9);
        border-radius: 10px;
        margin: 10px 15px;
        display: none;
    }

    /* Disable all hover effects on mobile */
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: none;
        opacity: 0;
        visibility: hidden;
    }

    /* Only show dropdown when Bootstrap adds .show class */
    .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}

/* Additional hover effects for better UX */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

.nav-link.active::before {
    width: 80%;
}

/* Smooth animation for navbar collapse */
.navbar-collapse {
    transition: all 0.3s ease;
}

.pdf-section {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f4f8 100%);
    position: relative;
    overflow: hidden;
}

.pdf-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.5;
    z-index: 0;
}

.pdf-section .container {
    position: relative;
    z-index: 1;
}

/* Filter Tabs */
.pdf-filters {
    margin-bottom: 3rem;
}

.filter-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid transparent;
    border-radius: 25px;
    padding: 12px 24px;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease; /* Reduced transition time */
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(10px);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.filter-btn:hover {
    transform: translateY(-1px); /* Reduced transform */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); /* Reduced shadow */
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px); /* Reduced transform */
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.25); /* Reduced shadow */
}

.filter-btn i {
    font-size: 1rem;
}

/* PDF Cards */
.pdf-grid {
    margin-bottom: 3rem;
}

.pdf-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Reduced transition time */
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    opacity: 1; /* Remove opacity animations */
}

.pdf-card:hover {
    transform: translateY(-4px); /* Reduced transform distance */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12); /* Reduced shadow */
}

/* PDF Image Container */
.pdf-image-container {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pdf-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

/* PDF Overlay */
.pdf-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.pdf-card:hover .pdf-overlay {
    opacity: 1;
}

.pdf-actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.action-btn i {
    font-size: 1rem;
}

/* PDF Badges */
.pdf-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manuscript-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
}

.book-badge {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
}

.research-badge {
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    color: white;
}

.pdf-format {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* PDF Content */
.pdf-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.pdf-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-author {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.pdf-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 0.8rem;
}

.meta-item i {
    color: var(--primary-color);
    font-size: 0.75rem;
}

/* PDF Rating */
.pdf-rating {
    display: flex;
    align-items: center;
       justify-content: space-between;
    margin-top: auto;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ffd700;
    font-size: 0.9rem;
}

.rating-text {
    color: #666;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Load More Button */
.btn-load-more {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.4);
    color: white;
}

/* PDF Stats */
.pdf-stats {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat-item {
    padding: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    transition: transform 0.3s ease;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
}

.stat-icon i {
    color: white;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }

    .filter-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }

    .pdf-image-container {
        height: 220px;
    }

    .pdf-content {
        padding: 1rem;
    }

    .pdf-title {
        font-size: 1rem;
    }

    .pdf-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .btn-load-more {
        padding: 12px 30px;
        font-size: 0.9rem;
    }
}

/* Hover Effects */
.pdf-card {
    --shadow-color: rgba(139, 92, 246, 0.15);
}

.pdf-card:hover {
    box-shadow: 0 20px 40px var(--shadow-color);
}

/* Loading States */
.pdf-card.loading {
    opacity: 0.7;
    pointer-events: none;
}

.pdf-card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@media (max-width: 576px) {
    .pdf-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-btn {
        width: 40px;
        height: 40px;
    }

    .pdf-stats {
        padding: 1.5rem 1rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
    }

    .stat-icon i {
        font-size: 1.2rem;
    }
}

/* Language Switcher Button */
.btn-lang {
    position: absolute;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(184, 134, 11, 0.3);
    z-index: 10;
}

/* Add position relative to navbar container */
.navbar .container {
    position: relative;
}

.btn-lang:hover {
    background: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(184, 134, 11, 0.4);
}

.btn-lang-mobile {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-lang-mobile:hover {
    background: var(--secondary-color);
}

.lang-text, .lang-text-mobile {
    display: inline-block;
}

/* RTL/LTR transition */
html[lang="en"] {
    direction: ltr !important;
}

html[lang="ar"] {
    direction: rtl !important;
}

body {
    transition: opacity 0.15s ease;
}

/* Adjust flex/alignment for LTR */
html[lang="en"] .navbar-nav {
    margin-right: auto !important;
    margin-left: 0 !important;
}

html[lang="en"] .btn-category i,
html[lang="en"] .btn-link i {
    margin-left: 8px;
    margin-right: 0;
    transform: rotate(180deg);
}
