/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    background-color: #ffffff;
    color: #1a1a1a;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: sticky;
    top: 0;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo a {
    font-size: 24px;
    font-weight: 800;
    color: #ffe659;
    text-decoration: none;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 30px;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }
}

.nav-link {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: #ffe659;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-btn {
    background: none;
    border: none;
    color: #1a1a1a;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    transition: color 0.3s;
}

.dropdown-btn:hover {
    color: #ffe659;
}

.user-btn {
    font-size: 20px;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #ffffff;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 8px;
    z-index: 1000;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #1a1a1a;
    text-decoration: none;
    transition: background-color 0.3s;
}

.dropdown-content a:hover {
    background-color: #f5f5f5;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: #1a1a1a;
    transition: all 0.3s;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    padding: 20px 0;
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile .nav-link {
    padding: 12px 0;
    text-align: right;
}

.mobile-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 10px 0;
}

/* Hero Carousel */
.hero-carousel {
    background: linear-gradient(135deg, #dc9617 0%, #272727 100%);
    padding: 60px 0;
    position: relative;
}

.carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    padding: 0 60px;
}

.carousel-slides {
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    display: none;
    animation: fadeIn 0.5s;
}

.carousel-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .slide-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .carousel-container {
        padding: 0 40px;
    }
}

.slide-text {
    color: #ffffff;
}

.slide-text h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .slide-text h2 {
        font-size: 24px;
    }
}

.rating {
    margin-bottom: 15px;
}

.star {
    color: #ffc107;
    font-size: 24px;
}

.price {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
}

.slide-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .slide-image img {
        max-width: 300px;
        margin: 0 auto;
        display: block;
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev {
    right: 0;
}

.carousel-btn.next {
    left: 0;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background-color: #ffe659;
    color: #ffffff;
    padding: 12px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
}

.btn-primary:hover {
    background-color: #3d4bc7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 95, 232, 0.3);
}

.btn-primary-large {
    display: inline-block;
    background-color: #ffe659;
    color: #ffffff;
    padding: 16px 48px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-primary-large:hover {
    background-color: #3d4bc7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 95, 232, 0.3);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 60px;
    color: #1a1a1a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.feature-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #ffffff;
}

.feature-icon.blue {
    background-color: #ffe659;
}

.feature-icon.green {
    background-color: #10b981;
}

.feature-icon.purple {
    background-color: #8b5cf6;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Search Section */
.search-section {
    padding: 60px 0;
    background-color: #ffffff;
}

.search-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    background-color: #E8F5E9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.search-input {
    flex: 1;
    padding: 20px 24px;
    border: none;
    background: transparent;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    outline: none;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background-color: #ffe659;
    color: #ffffff;
    border: none;
    padding: 20px 40px;
    font-family: 'Cairo', sans-serif;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-btn:hover {
    background-color: #3d4bc7;
}

/* Books Section */
.books-section {
    padding: 80px 0;
    background-color: #f9fafb;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.book-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.book-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
}

.book-image-wrapper {
    position: relative;
    overflow: hidden;
}

.book-image {
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform 0.3s;
}

.book-card:hover .book-image {
    transform: scale(1.1);
}

.book-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
}

.book-badge.subject {
    top: 12px;
    left: 12px;
    right: auto;
    background-color: #f97316;
}

.badge-blue {
    background-color: #ffe659;
}

.badge-green {
    background-color: #10b981;
}

.badge-purple {
    background-color: #8b5cf6;
}

.book-content {
    padding: 20px;
}

.book-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.book-rating {
    margin-bottom: 12px;
}

.book-rating .star {
    color: #ffc107;
    font-size: 16px;
}

.book-rating .star.empty {
    color: #e5e7eb;
}

.book-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.book-price {
    font-size: 20px;
    font-weight: 700;
    color: #ffe659;
}

.book-currency {
    font-size: 12px;
    color: #6b7280;
}

.text-center {
    text-align: center;
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #ffffff;
}

.footer-about {
    background-color: #716000;
    padding: 60px 0;
    text-align: center;
}

.footer-about h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 16px;
}

.footer-about p {
    font-size: 18px;
    opacity: 0.9;
}

.footer-content {
    padding: 60px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3,
.footer-column h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo {
    font-size: 24px;
    margin-bottom: 16px;
}

.footer-column p {
    color: #9ca3af;
    font-size: 14px;
    margin-bottom: 20px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s;
}

.social-link.pinterest {
    background-color: #e60023;
}

.social-link.youtube {
    background-color: #ff0000;
}

.social-link.twitter {
    background-color: #1da1f2;
}

.social-link.facebook {
    background-color: #1877f2;
}

.social-link.instagram {
    background-color: #e4405f;
}

.social-link:hover {
    transform: scale(1.1);
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #ffffff;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot.blue {
    background-color: #ffe659;
}

.dot.green {
    background-color: #10b981;
}

.dot.purple {
    background-color: #8b5cf6;
}

.footer-copyright {
    border-top: 1px solid #374151;
    padding: 24px 0;
    text-align: center;
}

.footer-copyright p {
    color: #9ca3af;
    font-size: 14px;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffe659;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(79, 95, 232, 0.3);
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    background-color: #3d4bc7;
    transform: translateY(-4px);
}
