/* Existing styles for alpha-search */
.alpha-search {
    margin: 17px 0;
    text-align: center;
}

.language-switch {
    margin-bottom: 13px;
}

.lang-btn {
    padding: 8px 13px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin: 0 5px;
    cursor: pointer;
    font-size: 12px;
    background-color: #ffffff;
    color: #333;
    transition: background-color 0.2s;
}

.lang-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.lang-btn:hover {
    background-color: #e9ecef;
}

.alpha-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
}

.alpha-links li {
    margin: 5px;
}

.alpha-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    color: #333;
    font-size: 18px;
    background-color: #fff;
}

.alpha-links a:hover {
    background-color: #f4f4f4;
}

.alpha-links a.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.alpha-links li:first-child a {
    width: auto;
    padding: 0 15px;
}

/* Styles for book-container (Myanmar Bookshop-inspired with new color scheme) */
.book-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    background-color: #ffffff; /* Light gray background */
}

.responsive {
    flex: 0 1 calc(25% - 20px); /* Four cards per row */
    max-width: calc(25% - 20px);
    box-sizing: border-box;
}

.gallery {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s, transform 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.gallery img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    background-color: #ffffff;
    padding: 10px;
    box-sizing: border-box;
}

.desc {
    padding: 8px 12px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.desc.author {
    font-size: 13px;
    color: #666;
    font-weight: 400;
    margin-top: -5px;
}

.card-footer {
    margin-top: auto;
    padding: 10px 12px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid #040000;
}

.card-footer .btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
    white-space: nowrap;
}

.card-footer .btn-read {
    background-color: #007bff;
    color: #ff0303;
    border: 1px solid #007bff;
}

.card-footer .btn-read:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.card-footer .btn-details {
    background-color: #28a745;
    color: white;
    border: 1px solid #28a745;
}

.card-footer .btn-details:hover {
    background-color: #218838;
    border-color: #218838;
}

.card-footer .btn-download {
    background-color: #746456; /* Orange for Download */
    color: white;
    border: 1px solid #ffffff;
}

.card-footer .btn-download:hover {
    background-color: #e06c00;
    border-color: #e06c00;
}

.card-footer .btn i {
    margin-right: 5px;
}
.pagination {
  display: flex;
  list-style: none;
}
.pagination li {
  flex: 1;
  margin: 0px 5px;
  background: #dde1e7;
  border-radius: 3px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
}
.pagination li a {
  font-size: 18px;
  text-decoration: none;
  color: #4d3252;
  height: 45px;
  width: 55px;
  display: block;
  line-height: 45px;
}
.pagination li:first-child a {
  width: 120px;
}
.pagination li:last-child a {
  width: 100px;
}
.pagination li.active {
  box-shadow: inset -3px -3px 7px #ffffff73,
    inset 3px 3px 5px rgba(94, 104, 121, 0.288);
}
.pagination li.active a {
  font-size: 17px;
  color: #6f6cde;
}
.pagination li:first-child {
  margin: 0 15px 0 0;
}
.pagination li:last-child {
  margin: 0 0 0 15px;
}
/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .responsive {
        flex: 0 1 calc(50% - 20px); /* Two cards per row */
        max-width: calc(50% - 20px);
    }

    .gallery img {
        height: 180px;
    }

    .desc {
        font-size: 14px;
    }

    .desc.author {
        font-size: 12px;
    }

    .card-footer {
        flex-direction: column;
        gap: 6px;
    }

    .card-footer .btn {
        font-size: 12px;
        padding: 6px 8px;
    }

    .alpha-links a {
        width: 35px;
        height: 35px;
        line-height: 35px;
        font-size: 16px;
    }
}

@media screen and (max-width: 576px) {
    .responsive {
        flex: 0 1 calc(50% - 20px); /* Maintain two cards per row */
        max-width: calc(50% - 20px);
    }

    .gallery img {
        height: 150px;
    }

    .desc {
        font-size: 13px;
    }

    .desc.author {
        font-size: 11px;
    }

    .card-footer .btn {
        font-size: 11px;
        padding: 5px 6px;
    }
}