/* General styles */
@font-face {
    font-family: 'YekanBakh';
    src: url('font/YekanBakhFaNum-Regular.woff2') format('woff2'),
         url('font/YekanBakhFaNum-Regular.woff') format('woff');
}

body {
    font-family: 'YekanBakh', sans-serif;
    direction: rtl;
    margin: 0;
    padding: 0;

}

.container {
    font-family: 'YekanBakh', sans-serif;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;

}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #003c79;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.logo {
    width: 100px;
    height: auto;
    margin-left: 10px;
}

.site-name {
    font-size: 24px;
    font-weight: bold;
    color: #003c79;
}

.search-bar {
    font-family: 'YekanBakh', sans-serif;
    display: flex;
    align-items: center;
    margin-bottom: 50px;
}

.search-dropdown {
    font-family: 'YekanBakh', sans-serif;
    padding: 5px;
    margin-left: 5px;
}

.search-input {
    font-family: 'YekanBakh', sans-serif;
    padding: 5px;
    width: 700px;
}

.search-button {
    height: 100%;
    font-family: 'YekanBakh', sans-serif;
    background-color: #003c79;
    color: white;
    border: none;
    padding: 7px 15px;
    cursor: pointer;
}

.menu {
    padding: 3px 0;
    border-bottom: 1px solid #003c79;
}

.menu ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    justify-content: space-around;
}

.menu ul li a {
    text-decoration: none;
    color: #333;
}

.book-slider-container {
    position:relative;
    overflow: hidden;
    padding: 0 40px; /* Make room for slider buttons */
}

.book-list {
    display: flex;
    transition: transform 0.3s ease;
    gap: 20px;
    text-align: center;
}

.book-item {
    flex: 0 0 calc(20% - 16px); /* 5 items per view, accounting for gap */
    /*max-width: calc(20% - 16px);*/
}

.book-slider-container {
    position: relative;
    overflow: hidden;
    padding: 0 40px; /* Make room for slider buttons */
}

.book-item a {
    text-decoration: none; /* حذف خط زیرین */
    color: #333; /* تعیین رنگ ثابت */
}

.book-item h3 {
    font-size: small;
}

.book-det {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
    text-align: center;
}

.book-itemdet {
    text-align: center;
    font-size: smaller;
}

.book-itemdet img {
    max-width: 70%;
    height: auto;
}
  
.book-item a:hover {
    color: #333; /* حفظ رنگ هنگام موس روی لینک */
}
  
.book-item a:active {
    color: #333; /* حفظ رنگ هنگام کلیک */
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #003c79;
    color: #ffffff;
    border: none;
    padding: 10px;
    cursor: pointer;
    z-index: 10; /* Ensure buttons are above book images */
}

.slider-button.prev {
    right: 0;
}

.slider-button.next {
    left: 0;
}

.book-item img {
    max-width: 80%;
    height: auto;
    margin: 10px;
}     

.footer {
    font-family: 'YekanBakh', sans-serif;
    background-color: #F2E8DA;
    text-align: center;
    height: 100%;
}

.social-icons {
    margin-top: 10px;
    text-align: center;
}

.social-icons img {
    max-width: 24px;
    height: auto;
}

.social-icons a {
    margin: 0 5px;
    color: #333;
    text-decoration: none;
}
.space {
    padding: 10px 0;
    text-align: center;
    font-size: smaller;
    color: #003c79;
}

.space-m {
    padding: 10px 0;
    text-align: center;
    font-size: smaller;
    color: #003c79;
}

.bline {
    border-bottom: 1px solid #003c79;
}

.page-section {
    padding: 40px 0;
    display: none;
}

.page-section.active {
    display: block;
}

h2 {
    color: #003c79;;
    margin-bottom: 20px;
}

.copyright {
    text-align: center;
    font-size: small;
}

.copyright-eng {
    text-align: center;
    font-size: small;
    direction: ltr;
    font-family: 'Times New Roman', Times, serif;
}
ul {
    list-style-type: square; /* or circle, none, disc, etc. */
}
nav ul li a {
    text-decoration: none; /* حذف خط زیرین */
    color: #333; /* تعیین رنگ ثابت */
}
  
nav ul li a:hover {
    color: #333; /* حفظ رنگ هنگام موس روی لینک */
}
  
nav ul li a:active {
    color: #333; /* حفظ رنگ هنگام کلیک */
}

.book-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.book-cover {
    max-width: 300px;
    height: auto;
    margin-bottom: 20px;
}

.book-detail h3 {
    color: #003c79;
    margin-bottom: 10px;
}

.book-detail p {
    margin-bottom: 10px;
}

/* Book Details Page */
.book-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    margin-top: 20px;
}

.book-info {
    flex: 1;
    text-align: right;
}

.book-image {
    flex: 0 0 40%;
    max-width: 40%;
}

.book-image img {
    max-width: 80%;
    height: auto;
}

.book-title {
    color: #003c79;
    font-size: 24px;
    text-align: center;
    height: 50px;
}

#book-authors {
    margin-bottom: 20px;
}

#book-description {
    margin-bottom: 20px;
    text-align: justify;
}
#book-executives {
    margin-bottom: 10px;
}

.section-title {
    background-color: #F2E8DA;
    color: #003c79;
    text-align: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.book-content {
    display: flex;
    flex-direction: row-reverse;
    gap: 10px;
    margin-top: 20px;
    /*max-width: 570px;*/
    margin-left: auto;
    margin-right: auto;
}

/* Desktop styles for the book slider title */
.book-slider-container .space {
    background-color: #F2E8DA;
    text-align: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.book-slider-container .space h3 {
    margin: 0;
}

.mobile-search-bar {
    display: none;
}

/*-------------------------------------------------*/
/*-------------------------------------------------*/
/*-------------------------------------------------*/
/*-------------------------------------------------*/
/*-------------------------------------------------*/
/* Responsive styles */
@media (max-width: 600px) {
    .container {
        max-width: 90%;
        padding: 0 10px;
    }
    .space-m {
        padding: 10px 0;
        text-align: center;
        font-size:x-small;
        color: #003c79;
    }
    
    .header {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: row; /* Ensures items stay in a single row */
        padding: 10px 0;
    }

    .logo-container {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        margin-right: 10px; /* Adds space between logo and search bar */
    }

    .logo {
        width: 50px; /* Adjust as needed */
        height: auto;
    }

    .site-name {
        display: none;
    }

    /* Hide the desktop search bar */
    .search-bar {
        display: none;
    }

    /* Show and style the mobile search bar */
    .mobile-search-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative; /* Add this to position the icon relative to the search bar */
        width: calc(100% - 70px); /* Adjust based on logo width */
        max-width: 300px;
    }


    .mobile-search-input {
        width: 100%;
        padding: 8px 30px 8px 10px;
        border: 1px solid #ccc;
        border-radius: 10px;
        font-size: 12px;
        height: 24px;
        line-height: 20px;
        font-family: 'YekanBakh', sans-serif;
    }

    .mobile-search-button {
        position: absolute;
        right: 10px; /* Keep it to the right within the search bar */
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        padding: 0;
        cursor: pointer;
        height: 20px;
        display: flex;
        align-items: center;
    }

    .mobile-search-button::before {
        content: '🔍';
        font-size: 16px;
    }

    .menu {
        width: 100%;
        padding: 0;
        /*border-top: 1px solid #eee;*/
        margin-top: 10px;
    }

    .menu ul {
        display: flex;
        justify-content: space-around;
        align-items: center;
    }

    .menu ul li {
        margin: 0;
    }

    .menu ul li a {
        display: block;
        text-align: center;
    }

    .menu ul li a::before {
        content: '';
        display: block;
        width: 24px;
        height: 16px;
        margin: 0 auto 5px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Add icons for each menu item */
    .menu ul li:nth-child(1) a::before { content: '🏠'; }
    .menu ul li:nth-child(2) a::before { content: '📚'; }
    .menu ul li:nth-child(3) a::before { content: '📝'; }
    .menu ul li:nth-child(4) a::before { content: '💡'; }
    .menu ul li:nth-child(5) a::before { content: '🤝'; }
    .menu ul li:nth-child(6) a::before { content: 'ℹ️'; }
    .menu ul li:nth-child(7) a::before { content: '🛒'; }
    .menu ul li:nth-child(8) a::before { content: '📧'; }

    .menu ul li a span {
        display: none; /* Hide the text */
    }

    /* Other mobile-specific styles... */

    .book-slider-container {
        padding: 0;
    }

    .book-list {
        display: flex;
        flex-direction: column;
    }

    .book-item {
        width: 100%;
        margin-bottom: 20px;
    }

    .book-item img {
        width: 50%;
        height: auto;
    }

    .book-item h3, .book-item p {
        font-size: 0.8em;
    }

    .slider-button {
        display: none;
    }

    .page-section {
        display: block;
    }

    /* Hide images in submit, contact, career, and about sections */
    #submit .book-image,
    #contact .book-image,
    #careers .book-image,
    #about .book-image {
        display: none;
    }

    /* Adjust text layout for these sections */
    #submit .book-info,
    #contact .book-info,
    #careers .book-info,
    #about .book-info {
        width: 90%;
        text-align: justify;
    }

    .book-content {
        flex-direction: column;
        max-width: 90%;
    }

    .book-image {
        width: 100%;
        max-width: 100%;
    }

    .book-image img {
        width: 50%;
        height: auto;
    }

    .book-info {
        width: 100%;
    }

    .page-section h2,
    .page-section h3,
    .page-section p {
        font-size: 0.9em;
    }

    /* published.html and ontheway.html specific styles */
    .book-det {
        display: flex;
        flex-direction: column;
    }

    .book-itemdet {
        width: 90%;
        margin-bottom: 20px;
    }

    .book-itemdet img {
        width: 50%;
        height: auto;
    }

    .book-itemdet h3, .book-itemdet p, .book-itemdet a {
        font-size: 0.8em;
    }

    .footer nav {
        display: none;
    }
}