:root {
            --primary-color: #1a472a;
            --secondary-color: #2d5a27;
            --accent-color: #5d8c3e;
            --gold-color: #c9a96e;
            --light-color: #f8f6f0;
            --dark-color: #1e2f1e;
            --text-color: #2c3e2c;
            --border-radius: 8px;
            --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            background: linear-gradient(135deg, #f8f6f0 0%, #e8e6df 100%);
            color: var(--text-color);
            line-height: 1.6;
            font-family: 'Amiri', serif;
            background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%235d8c3e' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
        }

        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 15px;
        }

        /* الترويسة الإسلامية */
        header {
            background-image: url('../img/header.jpg');
            background-size: cover; /* لتغطية كامل المساحة */
            background-position: center; /* لتركيز الصورة في المنتصف */
            background-repeat: no-repeat; /* لمنع التكرار */
            
            color: white;
            padding: 1rem 0;
            box-shadow: var(--box-shadow);
            top: 0;
            border-bottom: 3px solid var(--gold-color);
        }

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

        .logo-section {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-image {
            width: 150px;
            height: 150px;
            border-radius: 50%;
            object-fit: cover;
            border: 3px solid var(--gold-color);
            box-shadow: var(--box-shadow);
            background: white;
            padding: 5px;
        }

        
        .logo-section2 {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .logo-image2 {
            width: 250px;
            height: 250px;
            border-radius: 40%;
            object-fit: cover;
            border: 0px solid var(--gold-color);
            box-shadow: var(--box-shadow);
            background: transparent;
            padding: 5px;
            opacity: .8;
        }

        .logo-text {
            display: flex;
            flex-direction: column;
        }

        .logo-text h1 {
            font-size: 1.8rem;
            font-weight: 700;
            margin-bottom: 5px;
            font-family: 'Scheherazade New', serif;
            color: var(--gold-color);
            text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
        }

        .logo-text .supervision {
            font-size: 0.9rem;
            opacity: 0.9;
            color: #e0e0e0;
        }

        .logo-text .sheikh-name {
            font-size: 1rem;
            font-weight: 600;
            color: white;
        }

        .islamic-decoration {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-top: 5px;
        }

        .islamic-decoration i {
            color: var(--gold-color);
            font-size: 1.2rem;
        }

        nav ul {
            display: flex;
            list-style: none;
            gap: 25px;
        }

        nav a {
            color: white;
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s;
            padding: 8px 12px;
            border-radius: 4px;
            font-family: 'Amiri', serif;
            font-size: 1.1rem;
            position: relative;
        }

        nav a:hover {
            color: var(--gold-color);
            background: rgba(255,255,255,0.1);
        }

        nav a::after {
            content: '';
            position: absolute;
            bottom: 0;
            right: 0;
            width: 0;
            height: 2px;
            background: var(--gold-color);
            transition: width 0.3s;
        }

        nav a:hover::after {
            width: 100%;
        }

        .user-actions {
            display: flex;
            gap: 15px;
        }

        .btn {
            padding: 10px 20px;
            border: none;
            border-radius: var(--border-radius);
            cursor: pointer;
            font-weight: 500;
            transition: all 0.3s;
            font-family: 'Amiri', serif;
            font-size: 1rem;
        }

        .btn-primary {
            background: linear-gradient(to bottom, var(--accent-color), var(--secondary-color));
            color: white;
            border: 1px solid var(--gold-color);
        }

        .btn-outline {
            background-color: transparent;
            border: 1px solid var(--gold-color);
            color: var(--gold-color);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--box-shadow);
        }

        .btn-primary:hover {
            background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
        }

        .btn-outline:hover {
            background-color: rgba(201, 169, 110, 0.1);
        }

        /* قسم البحث */
        .search-section {
            background-color: white;
            padding: 2.5rem 0;
            margin-bottom: 2rem;
            box-shadow: var(--box-shadow);
            border-bottom: 2px solid var(--gold-color);
            background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%235d8c3e' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
        }

        .search-container {
            max-width: 1000px;
            margin: 0 auto;
        }

        .search-title {
            text-align: center;
            margin-bottom: 1.5rem;
            color: var(--primary-color);
            font-family: 'Scheherazade New', serif;
            font-size: 1.8rem;
            position: relative;
            display: inline-block;
            width: 100%;
        }

        .search-title::before {
            content: "";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            color: var(--gold-color);
            margin: 0 15px;
            font-size: 1.5rem;
        }

        .search-form {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr auto;
            gap: 15px;
            margin-bottom: 1.5rem;
        }

        .search-field {
            display: flex;
            flex-direction: column;
        }

        .search-label {
            margin-bottom: 5px;
            font-weight: 500;
            color: var(--dark-color);
            font-family: 'Amiri', serif;
        }

        .search-input, .search-select {
            padding: 12px 15px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            font-size: 1rem;
            outline: none;
            transition: all 0.3s;
            font-family: 'Amiri', serif;
            background: #fefefe;
        }

        .search-input:focus, .search-select:focus {
            border-color: var(--accent-color);
            box-shadow: 0 0 0 2px rgba(93, 140, 62, 0.2);
        }

        .search-btn {
            background: linear-gradient(to bottom, var(--accent-color), var(--secondary-color));
            color: white;
            border: none;
            padding: 0 25px;
            border-radius: var(--border-radius);
            cursor: pointer;
            align-self: flex-end;
            height: 46px;
            transition: all 0.3s;
            font-family: 'Amiri', serif;
            font-size: 1.1rem;
            border: 1px solid var(--gold-color);
        }

        .search-btn:hover {
            background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
            transform: translateY(-2px);
        }

        /* قسم التصنيفات */
        .categories-section {
            margin-bottom: 2rem;
        }

        .section-title {
            margin-bottom: 1.5rem;
            color: var(--primary-color);
            border-bottom: 2px solid var(--gold-color);
            padding-bottom: 0.5rem;
            display: inline-block;
            font-family: 'Scheherazade New', serif;
            font-size: 1.6rem;
            position: relative;
        }

        .section-title::after {
            content: "";
            position: absolute;
            bottom: -2px;
            right: 0;
            width: 50%;
            height: 2px;
            background: var(--accent-color);
        }

        .categories-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
            gap: 20px;
        }

        .category-card {
            background: linear-gradient(135deg, white 0%, #f8f6f0 100%);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            text-align: center;
            box-shadow: var(--box-shadow);
            transition: all 0.3s;
            cursor: pointer;
            border: 1px solid #e8e6df;
            position: relative;
            overflow: hidden;
            text-decoration: none;
            color: inherit;
        }

        .category-card::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, var(--primary-color), var(--accent-color));
        }

        .category-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        }

        .category-icon {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 15px;
            transition: all 0.3s;
        }

        .category-card:hover .category-icon {
            color: var(--accent-color);
            transform: scale(1.1);
        }

        .category-card h3 {
            font-family: 'Amiri', serif;
            font-size: 1.3rem;
            color: var(--dark-color);
        }

        /* قسم الكتب */
        .books-section {
            margin-bottom: 2rem;
        }

        .books-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1.5rem;
        }

        .filter-options {
            display: flex;
            gap: 10px;
        }

        .filter-select {
            padding: 10px 15px;
            border: 1px solid #ddd;
            border-radius: var(--border-radius);
            background-color: white;
            font-family: 'Amiri', serif;
            font-size: 1rem;
            outline: none;
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 25px;
        }

        .book-card {
            background: linear-gradient(135deg, white 0%, #f8f6f0 100%);
            border-radius: var(--border-radius);
            padding: 1.5rem;
            box-shadow: var(--box-shadow);
            transition: all 0.3s;
            display: flex;
            flex-direction: column;
            border: 1px solid #e8e6df;
            position: relative;
            overflow: hidden;
        }

        .book-card::before {
            content: "";
            position: absolute;
            top: 0;
            right: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(to right, var(--primary-color), var(--accent-color));
        }

        .book-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.15);
        }

        .book-icon {
            font-size: 3rem;
            color: var(--primary-color);
            text-align: center;
            margin-bottom: 15px;
            transition: all 0.3s;
        }

        .book-card:hover .book-icon {
            color: var(--accent-color);
            transform: scale(1.1);
        }

        .book-title {
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: 10px;
            color: var(--dark-color);
            font-family: 'Scheherazade New', serif;
            line-height: 1.4;
        }

        .book-author {
            color: #666;
            margin-bottom: 10px;
            font-family: 'Amiri', serif;
            font-size: 1.1rem;
        }

        .book-meta {
            display: flex;
            justify-content: space-between;
            margin-top: auto;
            color: #777;
            font-size: 0.9rem;
            font-family: 'Amiri', serif;
        }



        /* التذييل */
        footer {
            background: linear-gradient(135deg, var(--dark-color) 0%, var(--primary-color) 100%);
            color: white;
            padding: 3rem 0 1.5rem;
            border-top: 3px solid var(--gold-color);
        }

        .footer-content {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 30px;
            margin-bottom: 2rem;
        }

        .footer-column h3 {
            margin-bottom: 1.5rem;
            color: var(--gold-color);
            font-family: 'Scheherazade New', serif;
            font-size: 1.4rem;
            position: relative;
            display: inline-block;
        }

        .footer-column h3::after {
            content: "";
            position: absolute;
            bottom: -5px;
            right: 0;
            width: 50%;
            height: 2px;
            background: var(--accent-color);
            
        }

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

        .footer-links li {
            margin-bottom: 12px;
            position: relative;
            padding-right: 15px;
        }

        .footer-links li::before {
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            color: var(--gold-color);
            font-size: 0.8rem;
        }

        .footer-links a {
            color: #ddd;
            text-decoration: none;
            transition: color 0.3s;
            font-family: 'Amiri', serif;
            font-size: 1.1rem;
        }

        .footer-links a:hover {
            color: var(--gold-color);
        }

        .copyright {
            text-align: center;
            padding-top: 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.2);
            color: #aaa;
            font-family: 'Amiri', serif;
        }

        /* تصميم متجاوب */
        @media (max-width: 768px) {
            .header-content {
                flex-direction: column;
                gap: 15px;
            }

            .logo-section {
                flex-direction: column;
                text-align: center;
            }

            nav ul {
                flex-wrap: wrap;
                justify-content: center;
            }

            .search-form {
                grid-template-columns: 1fr;
            }

            .search-btn {
                width: 100%;
            }

            .books-header {
                flex-direction: column;
                gap: 15px;
                align-items: flex-start;
            }
        }

        .category-link {
            text-decoration: none;
            color: inherit;
        }

        .book-count {
            font-size: 14px;
            margin-top: 8px;
            color: #555;
        }

        .category-card {
            transition: .2s;
        }

        .category-card:hover {
            transform: scale(1.04);
            cursor: pointer;
        }

        .alphabet-letter {
            margin-top: 40px;
            margin-bottom: 15px;
            font-size: 26px;
            font-weight: bold;
            color: #2c3e50;
            border-bottom: 2px solid #eee;
            padding-bottom: 5px;
        }

        .small-card h3 {
            font-size: 15px;
        }

        .category-count {
            display: block;
            margin-top: 5px;
            font-size: 13px;
            color: #777;
        }
                /* fade animations */
        .fade-out {
        opacity: 0;
        transform: translateY(10px);
        transition: all .25s ease;
        }

        .fade-in {
        animation: fadeInUp .35s ease forwards;
        }

        @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
        }

        /* skeleton loading */
        .skeleton-row {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(220px,1fr));
        gap: 16px;
        }

        .skeleton-card {
        height: 160px;
        border-radius: 10px;
        background: linear-gradient(
            90deg,
            #eee 25%,
            #f5f5f5 37%,
            #eee 63%
        );
        background-size: 400% 100%;
        animation: skeleton-loading 1.2s ease infinite;
        }

        @keyframes skeleton-loading {
        0% { background-position: 100% 50%; }
        100% { background-position: 0 50%; }
        }

/* Skeleton Loader */
.skeleton-row {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 20px;
}
.skeleton-card {
  height: 260px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    #eee 25%,
    #f5f5f5 37%,
    #eee 63%
  );
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
@keyframes shimmer {
  0% { background-position: 100% 0 }
  100% { background-position: -100% 0 }
}

/* Highlight */
mark {
  background: #ffe58f;
  padding: 2px 4px;
  border-radius: 4px;
}

.book-details-card{
    background:#fff;
    border-radius:14px;
    box-shadow:0 6px 20px rgba(0,0,0,.08);
    padding:30px;
    max-width:900px;
    margin:auto;
}
.book-details-header{
    border-bottom:1px solid #eee;
    margin-bottom:25px;
}
.book-details-header h1{
    margin:0 0 8px;
    font-size:26px;
}
.book-details-header p{
    color:#555;
    margin:0 0 15px;
}
.book-details-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:18px;
}
.detail-item{
    background:#f8f8f8;
    border-radius:10px;
    padding:14px;
}
.detail-item span{
    display:block;
    font-size:13px;
    color:#777;
    margin-bottom:6px;
}
.book-details-footer{
    margin-top:30px;
    text-align:center;
}

.book-details-link{
    font-size: 13px;
    padding: 0;
    color: #024d06;
    text-decoration: none !important;
}

.book-details-btn{
    margin-top:30px;
    text-align:right;
}

.book-details-btn{
    font-size: 13px;
    padding: 0;
    color: #024d06;
    text-decoration: none !important;
}

.book-details-link i{
    font-size: 14px;
}


