/* Base Styles */




body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: url('../nour.jpg') no-repeat center center fixed;
    background-size: cover;
    background-attachment: fixed;   /* تبقى ثابتة عند التمرير */
    background-repeat: no-repeat;
    background-position: center center;
    color: #fff;
    direction: rtl;
    text-align: right;
    margin: 0;
}

/* زر البروفايل */
.profile-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 26px;
    background: #9791915c;
    position: absolute;
    top: 11px;
    right: 10px;
}

/* الخلفية */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 9;
}

/* القائمة الجانبية (مخفية افتراضيًا) */
.side-menu {
    position: fixed;
    top: 0;
    right: -260px; /* مخفية خارج الشاشة */
    width: 260px;
    height: 100%;
    background: #131314f2;
    box-shadow: -3px 0 10px rgba(0,0,0,0.2);
    padding: 0px;
    transition: right 0.3s ease;
    z-index: 10;
}

.side-menu a {
    display: block;
    padding: 12px 30px;
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    text-align: right;
}

.side-menu a:hover {
    background-color: #e3c100;
    color: #000000;
}

.close-btn {
    font-size: 26px;
    cursor: pointer;
    text-align: left;
}

.log {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    right: 22px;
    top: 18px;
}

/* Header */
.div2 {
    background: rgba(0, 0, 0, 0);
    color: #fff;
    padding: 10px 0;
    text-align: center;
    font-size: 150%;
    margin: 0px;
}

/* Navigation Bars */
.bar1, .bar0 {
    width: 100%;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    font-family: 'Poppins', sans-serif;
}

.bar1 {
    gap: 50px;
    padding: 15px 0;
    position: relative;
    top: -10px;
}

.bar0 {
    bottom: 55px;
    left: 0;
    gap: 70px;
    z-index: 1000;
    padding: 16px 0;
}

.bar0 > a {
    background: rgba(0, 0, 0, 0.8);
    padding: 5px 16px;
    border-radius: 20px;
}
.cop {
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 20px;
    width: 35%;
    bottom: 0;
    border-radius: 20px;
    width: 248px;
  margin: 0 auto;
}

/* Navigation Links */
.bar1 > a, .bar0 > a {
    color: white;
    
    font-size: 1.1rem;
    text-decoration: none;
    transition: color 0.3s ease;
}

.bar1 > a {
    cursor: pointer;
    background: none;
    border: none;
    background: rgba(255, 255, 255, 0.19);
    border: 1px solid rgb(151, 151, 151);
    border-radius: 21px;
    padding: 5px 16px;
}

.bar1 > a:hover, .bar0 > a:hover {
    background-color: #cacaca98;
    /* color: #000000; */
}

.c1 {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.c2 {
    width: 40%;
    max-width: 600px;
    padding: 35px;
    border-radius: 65px;

    background: rgba(255, 255, 255, 0.08); /* شفافية */
    backdrop-filter: blur(12px);           /* البلور الأساسي */
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);

    text-align: center;
    color: #fff;
    animation: fadeIn 0.7s ease;
}

.c2 h2,
.c2 h3 {
    margin: 15px 0;
    font-weight: 600;
}

.email-link {
    display: block;
    font-size: 18px;
    margin: 10px 0 25px;
    color: #ffe28a;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .5px;

    transition: color .3s ease, transform .2s ease;
}

/* شكل اللينك يكون كتابة عادية */
.email-link:hover {
    color: #ffffff;
    transform: scale(1.03);
}

/* حركة دخول بسيطة */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.about-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
}

.about-card {
    width: 90%;
    max-width: 850px;
    padding: 35px 30px;
    border-radius: 20px;

    /* خلفية زجاجية شفافة */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);

    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);

    direction: rtl;
    text-align: right;
    color: #fff;
    line-height: 1.8;
    animation: fadeinUp 0.8s ease;
}

/* تنسيق العناوين */
.about-card h2 {
    margin: 15px 0;
    font-size: 22px;
    font-weight: 600;
}

.about-card h3 {
    margin: 10px 0;
    font-size: 19px;
    font-weight: 500;
    color: #ffe7ac;
}

/* حركة دخول */
@keyframes fadeinUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}



/* Content Container */
.parent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    /* position: relative;
        top: 21px; */
}

/* Content Bars */
.bar2, .bar3, .bar4, .bar5, .bar6, .bar7 {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    background: rgba(255, 255, 255, 0.19);
    border: 1px solid rgb(151, 151, 151);
    padding: 5px 10px;
    border-radius: 12px;
    width: 35%;
    max-width: 600px;
    text-align: right;
    transition: transform 0.3s ease;
    direction: rtl;      /* اتجاه النصوص */
    text-align: right;   /* محاذاة الكتابة لليمين */
}

.bar2:hover, .bar3:hover, .bar4:hover, .bar5:hover, .bar6:hover, .bar7:hover {
    transform: translateY(-4px);
}

.bar2 a, .bar3 a, .bar4 a, .bar5 a, .bar6 a, .bar7 a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.bar2 a:hover, .bar3 a:hover, .bar4 a:hover, .bar5 a:hover, .bar6 a:hover,.bar7 a:hover {
    color: #ffd700;
}

.bar2 img {
    width: 100px;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Search Form */
.search-container {
    display: flex;
    align-items: center;
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    padding: 5px 2px;
    backdrop-filter: blur(1px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.search-form:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 0.9rem;
    padding: 5px 2px;
    width: 200px;
    font-family: 'Poppins', sans-serif;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.search-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px 2px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffd700;
    transform: scale(1.1);
}

.search-btn i {
    font-size: 0.9rem;
}

/* Search Results Page */
.search-results {
    margin: 20px auto;
    width: 60%;
    max-width: 1200px;
    text-align: center;
}

.search-results h2 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 12px;
    display: inline-block;
}

.search-results > p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.icoo {
    transform: translateX(-2px);
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 0px;
}

.book-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.book-image {
    margin-bottom: 15px;
}

.book-image img {
    width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.book-info h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 10px;
    text-align: right;
}

.book-info .author,
.book-info .category {
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 5px;
    text-align: right;
}

.book-info .description {
    color: #ddd;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 20px;
    text-align: right;
}

.book-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.download-btn,
.read-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.download-btn:hover,
.read-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.download-btn i,
.read-btn i {
    font-size: 0.8rem;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    margin: 40px 0;
}

.no-results i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.no-results p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 30px;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Footer */
@media screen and (max-width: 1024px){
    .phon1{
        display: none;
    }
}

/* Media Queries */
@media screen and (max-width: 800px) {
    body {
        background-attachment: fixed;
        background-position: center;
    }
    .phon1{
        display: none;
    }
    .bar1 {
        flex-direction: row;
        gap: 25px;
        padding: 10px 0;
    }
    
    .bar1 > a, .bar0 > a {
        font-size: 1rem;
    }

    .bar1 > a {
        border-radius: 21px;
        padding: 1px 11px;
        text-align: right;
        
    }

    .log {
        top: -54px;
    }

    /* .search-form {
        width: 100%;
        max-width: 300px;
    } */
    
    .search-input {
        opacity: 1;     /* Make input visible */
        width: 100%;   /* Make input take full width */
        transition: none; /* Remove transition */
        position: static; /* Reset position */
        z-index: auto; /* Reset z-index */
    }
    
    .search-btn {
        padding: 4px 6px;
        transition: none; /* Remove transition */
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .search-btn i {
        font-size: 0.8rem;
    }
    
    /* Remove scale on active for search button */
    .search-btn:active {
        transform: none; 
    }
    
    /* Remove focus-within effects */
    .search-form:focus-within {
        width: 100%; /* Keep full width */
    }
    
    .search-form:focus-within .search-input {
        opacity: 1;    /* Keep visible */
        width: 100%;   /* Keep full width */
    }
    
    .parent {
        margin: 20px 0;
        gap: 15px;
    }
    
    .bar2, .bar3, .bar4, .bar5, .bar6, .bar7 {
        width: 20%;
        padding: 12px 20px;
        gap: 10px;
     
    }
    
    .bar0 {
        gap: 20px;
        padding: 10px 0;
        bottom: 60px;
    }
    
    .bar2 img {
        width: 80px;
    }
    
      .search-form {
        display: flex;
        align-items: center;
        border-radius: 20px;
        /* overflow: hidden; */
        /* width: 35px; الأيقونة بس */
        background: rgba(0, 0, 0, 0.1);
        /* transition: width 0.4s ease; */
    }
    
    .search-input {
        font-size: 0.8rem;
        /* padding: 4px 8px; */
        /* border: none; */
        /* outline: none; */
        /* opacity: 0;     مخفي
        width: 0;       مش واخد مكان */
        /* transition: opacity 0.3s ease, width 0.4s ease; */
        position: relative;   /* مهم */
        z-index: 10; 
    }
    
    .search-btn {
        padding: 4px 6px;
        transition: transform 0.2s ease;
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .search-btn i {
        font-size: 0.8rem;
    }
    
    /* يكبر عند الضغط */
    /* .search-btn:active {
        transform: scale(1.2);
    } */
    
    /* لما الفورم يبقى فيه فوكس (input مختار) */
    /* .search-form:focus-within {
        width: 150px; /* يكبر */
    /* }  */
    
    /* .search-form:focus-within .search-input {
        opacity: 1;    /* يظهر */
        /* width: 100%;   /* ياخد مكان */
    /* }  */
    
}

@media screen and (max-width: 480px) {

    .c2 {
        width: 70%;
    }

    .side-menu {
        width: 180px;
    }

    .phon1{
        display: block;
    }
    .phon{
        display: none;
    }

    .profile-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        font-size: 21px;
        background: #9791915c;
        position: absolute;
        top: 6px;
    }
    .div2 {
        font-size: 120%;
        padding: 8px 0;
    }
    
    .bar1 {
        gap: 12px;
        padding: 6px 0px;
        top: 0;
      }

    .bar1 > a {
        font-size: 14px;
        padding: 10px 13px;
        border-radius: 23px;
      }
    
    .bar0 > a {
        font-size: 12px;
    }
    
    .log {
        right: 7px;
        top: 41px;
    }

    .search-form {
        display: flex;
        align-items: center;
        border-radius: 20px;
        overflow: hidden;
        width: 35px; /* الأيقونة بس */
        background: rgba(0, 0, 0, 0.1);
        transition: width 0.4s ease;
    }
    
    .search-input {
        font-size: 0.8rem;
        padding: 4px 16px;
        border: none;
        outline: none;
        opacity: 0;     /* مخفي */
        width: 0;       /* مش واخد مكان */
        transition: opacity 0.3s ease, width 0.4s ease;
    }

    .icoo {
        transform: translateX(36px);
    }
    
    .search-btn {
        padding: 4px 6px;
        transition: transform 0.2s ease;
        background: none;
        border: none;
        cursor: pointer;
    }
    
    .search-btn i {
        font-size: 0.8rem;
    }
    
    /* يكبر عند الضغط */
    .search-btn:active {
        transform: scale(1.2);
    }
    
    /* لما الفورم يبقى فيه فوكس (input مختار) */
    .search-form:focus-within {
        width: 150px; /* يكبر */
    }
    
    .search-form:focus-within .search-input {
        opacity: 1;    /* يظهر */
        width: 100%;   /* ياخد مكان */
    }
    
    
    
    .bar2, .bar3, .bar4, .bar5, .bar6, .bar7 {
        width: 50%;
        padding: 10px 15px;
        flex-direction: column;
        text-align: center;
    }

    
    .bar0 {
        gap: 8px;
        bottom: 50px;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
    }
    
    .bar2 img {
        width: 60px;
    }

    .containar1 {
        width: 80%;
    }
    
    
    footer {
        padding: 8px 0;
        font-size: 0.9rem;
    }
    
    /* Search Results Responsive */
    .search-results {
        margin: 20px auto;
        width: 95%;
    }
    
    .search-results h2 {
        font-size: 1.5rem;
        padding: 12px;
    }
    
    .books-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .book-card {
        padding: 15px;
    }
    
    .book-image img {
        width: 100px;
    }
    
    .book-info h3 {
        font-size: 1.1rem;
    }
    
    .book-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .download-btn,
    .read-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .bar0 a:nth-child(1),
    .bar0 a:nth-child(2) {
        flex-basis: 20%;  /* اثنين في الصف */
        order: 2;
        text-align: center;

    }

    .bar0 a:nth-child(3),
    .bar0 a:nth-child(4),
    .bar0 a:nth-child(5) {
        flex-basis: 20%; /* ثلاثة في الصف */
        order: 1;
        text-align: center;
    }
}

@media screen and (max-width: 380px) {
    .bar1 {
        gap: 15px;
    }
    .bar0 {
    padding: 5px 0px;
    gap: 8px;
    }
    .bar0 > a {
        padding: 6px 3px;
        font-size: 11px;  
    }
    .bar1 > a {
        padding: 8px 10px;
        font-size: 15px;
    }
    .profile-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        border: none;
        cursor: pointer;
        font-size: 21px;
        background: #9791915c;
        position: absolute;
        top: 12px;
    }
    .phon {
        display: none;
    }
    .phon1{
        display: none;
    }
}